It took six months, but now I've done it too.
Sorry for sending you all an email to Jenn...with my code unattached.
S
Quoting Shahrzad Sabet <ssabet at fas.harvard.edu>:
Hi Jenn,
I'm still not officially registered for the class (I definitely will by next
week), so unfortunately, I have to email my code to you again.
Here it is attached.
Thanks!
Shahrzad
Quoting Jenn Larson <jmlarson at fas.harvard.edu>:
and of course all you careful readers caught that
I referred to pbinom() as
returning the probability of a particular number of successes, when really
it's the probability of a particular number of successes or fewer.
You could perform the same test I suggested in the last email less
confusingly using the density value, dbinom(). Since the binomial
distribution is discrete, the density value is a probability.
Cheers,
Jenn
On Wed, Mar 5, 2008 at 4:36 PM, Jenn Larson <jmlarson at fas.harvard.edu>
wrote:
> The best way to think about the full probability distribution is to first
> think about the probability of a single observation.
>
> One of the N observations, say y_j, is distributed according to a
binomial
> distribution. That y_j records the total
number of successes out of T
> trials. If our example were a flip of ten coins (where each flip lands
> heads or tails independently of the others), then T would be 10 and our
y_j
> records the total number of successes (say,
coins that land heads) out of
> 10. If we have 2 observations, then we have 2 instances of ten coins
> flipped, and both observations tell the number that landed heads out of
10.
> To find the probability of observing both
observations, you would take
the
> product of both probability distributions.
>
> This isn't exactly the same as modeling the total number of successes
(the
> sum of the ys) out of the total number of
observations*trials (NT).
>
> To convince yourself of the difference, you can consult pbinom(), which
> returns the probability of observing a particular number of success out
of
a
> trial of a particular size and the probability of success in each of the
> trials. If it were true that the probability of observing a 3 out of 10
> twice were the same as observing a 6 out of 20, then pbinom(q = 3, size =
> 10, prob= .2) * pbinom(q = 3, size = 10, prob = .2) should equal pbinom(q
=
> 6, size = 20, prob = .2), which isn't
the case.
>
> Hope this helps,
>
> Jenn
>
>
> On Wed, Mar 5, 2008 at 4:28 PM, Laurence Tai <ltai at post.harvard.edu>
> wrote:
>
> > I think we are trying to find the most likely value of pi, given that
> > you have N observations of the binomial distribution with T trials.
That
>
there are T trials in each observation means that the binomial
distribution
> has T trials. It's not formally the
same as calculating the probability
of k
> > successes in N*T trials because you only get to see the sum of
successful
> > trials in each observation. Hope this
provides some clarification.
> >
> > --Laurence
> >
> >
> > On Wed, Mar 5, 2008 at 3:03 PM, Sean Li <seanli at fas.harvard.edu>
wrote:
> >
> > > I have the same question. Reply-all, please.
> > >
> > >
> > > On Tue, Mar 4, 2008 at 3:13 PM, Keith Schnakenberg <
> > > keith.schnakenberg at gmail.com> wrote:
> > >
> > > > I was unsure in b and c how to treat N observations with T trials.
> > > > Are we just calculating the probability of k successes in N*T
> > > > trials,
> > > > or what? I did it this way, but it seemed that they would have just
> > > > told us N trials since we would have done essentially the same
> > > > thing.
> > > >
> > > > I hope I made my question clear. Basically, I am wanting to know if
> > > > this information changes the problem from the standard way of
> > > > thinking about a binomial distribution (a number of trials, k, p)
to
> > something else (for example, where a
successful observation is one
> > with all successful trials, etc.)
> >
> > Thanks,
> > Keith
> > _______________________________________________
> > gov2001-l mailing list
> > gov2001-l at
lists.fas.harvard.edu
> >
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
> >
> >
>
> _______________________________________________
> gov2001-l mailing list
> gov2001-l at
lists.fas.harvard.edu
>
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>
>
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l