Statistics/Distributions/Geometric

From testwiki
Revision as of 01:06, 4 October 2019 by imported>Matiia (Reverted edits by 159.146.10.65 (talk) to last version by 82.5.25.12)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Geometric Distribution

Template:Probability distribution There are two similar distributions with the name "Geometric Distribution".

  • The probability distribution of the number X of Bernoulli trials needed to get one success, supported on the set { 1, 2, 3, ...}
  • The probability distribution of the number Y = X − 1 of failures before the first success, supported on the set { 0, 1, 2, 3, ... }

These two different geometric distributions should not be confused with each other. Often, the name shifted geometric distribution is adopted for the former one. We will use X and Y to refer to distinguish the two.

Shifted

The shifted Geometric Distribution refers to the probability of the number of times needed to do something until getting a desired result. For example:

  • How many times will I throw a coin until it lands on heads?
  • How many children will I have until I get a girl?
  • How many cards will I draw from a pack until I get a Joker?

Just like the Bernoulli Distribution, the Geometric distribution has one controlling parameter: The probability of success in any independent test.

If a random variable X is distributed with a Geometric Distribution with a parameter p we write its probability mass function as:

P(X=i)=p(1p)i1

With a Geometric Distribution it is also pretty easy to calculate the probability of a "more than n times" case. The probability of failing to achieve the wanted result is (1p)k.

Example: a student comes home from a party in the forest, in which interesting substances were consumed. The student is trying to find the key to his front door, out of a keychain with 10 different keys. What is the probability of the student succeeding in finding the right key in the 4th attempt?

P(X=4)=110(1110)41=110(910)3=0.0729

Unshifted

The probability mass function is defined as:

f(x)=p(1p)x for x{0,1,2,}

Mean

E[X]=if(xi)xi=0p(1p)xx

Let q=1-p

E[X]=0(1q)qxx
E[X]=0(1q)qqx1x
E[X]=(1q)q0qx1x
E[X]=(1q)q0ddqqx

We can now interchange the derivative and the sum.

E[X]=(1q)qddq0qx
E[X]=(1q)qddq11q
E[X]=(1q)q1(1q)2
E[X]=q1(1q)
E[X]=(1p)p

Variance

We derive the variance using the following formula:

Var[X]=E[X2](E[X])2

We have already calculated E[X] above, so now we will calculate E[X2] and then return to this variance formula:

E[X2]=if(xi)x2
E[X2]=0p(1p)xx2

Let q=1-p

E[X2]=0(1q)qxx2

We now manipulate x2 so that we get forms that are easy to handle by the technique used when deriving the mean.

E[X2]=(1q)0qx[(x2x)+x]
E[X2]=(1q)[0qx(x2x)+0qxx]
E[X2]=(1q)[q20qx2x(x1)+q0qx1x]
E[X2]=(1q)q[q0d2(dq)2qx+0ddqqx]
E[X2]=(1q)q[qd2(dq)20qx+ddq0qx]
E[X2]=(1q)q[qd2(dq)211q+ddq11q]
E[X2]=(1q)q[q2(1q)3+1(1q)2]
E[X2]=2q2(1q)2+q(1q)
E[X2]=2q2+q(1q)(1q)2
E[X2]=q(q+1)(1q)2
E[X2]=(1p)(2p)p2

We then return to the variance formula

Var[X]=[(1p)(2p)p2](1pp)2
Var[X]=(1p)p2

Template:BookCat