[R] qqplot for binomial distribution

Ashim Kapoor ashimkapoor at gmail.com
Mon Apr 17 15:26:13 CEST 2017


Dear Boris,

Okay and Thanks.

Best,
Ashim

On Mon, Apr 17, 2017 at 6:45 PM, Boris Steipe <boris.steipe at utoronto.ca>
wrote:

> Moreover, setting the seed once, then evaluating two functions means you
> are sampling from the same distributions, but you do in fact have different
> values. Outliers in the rarefied tails of the distribution may lie quite
> considerably off the expected diagonal. Try
>
> set.seed(123)
> qqplot(rbinom(n=1000, size=1000, p=0.05),
>        rbinom(n=1000, size=1000, p=0.05))
>
> and you will find that you approximate the "1 clear line" quite well - for
> most of the values.
>
>
> B.
>
>
>
>
> > On Apr 17, 2017, at 9:01 AM, Spencer Graves <spencer.graves@
> effectivedefense.org> wrote:
> >
> >
> >
> > On 2017-04-17 7:58 AM, Ashim Kapoor wrote:
> >> Dear All,
> >>
> >> set.seed(123)
> >> qqplot(rbinom(n=100,size=100,p=.05), rbinom(n=100,size=100,p=.05) )
> >>
> >> I expect to see 1 clear line,but I don't. What am I misunderstanding?
> >
> >
> >      The distribution is discrete, and points are superimposed. Try the
> following:
> >
> >
> > set.seed(123)
> > qqplot(jitter(rbinom(n=100,size=100,p=.05)),
> >       jitter(rbinom(n=100,size=100,p=.05) ))
> >
> >
> >      Spencer Graves
> >>
> >> Best Regards,
> >> Ashim
> >>
> >>      [[alternative HTML version deleted]]
> >>
> >> ______________________________________________
> >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >> https://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
> >
> > ______________________________________________
> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list