23
Geometric and Hyper-geometric Distribution

Geometric and Hyper-geometric Distribution. Geometric Random Variable Take a fair coin and toss it as many times as needed until you observe a head

Embed Size (px)

Citation preview

Page 1: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

Geometric and Hyper-geometric Distribution

Page 2: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

Take a fair coin and toss it as many times as needed until you observe a head.

Let X= number of tosses that is needed. Sample points={H, TH, TTH, TTTH, …} Distribution of X

XX 1 (H)1 (H) 2(TH)2(TH) 3(TTH3(TTH))

4(TTTH4(TTTH))

K(TTT…K(TTT…TH)TH)

P(X)P(X) 1/21/2 1/41/4 1/81/8 1/161/16 ??

Page 3: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

Think about another example, if we keep tossing a biased coin with 70% of getting a tail and 30% of seeing a head, let X=number of tosses needed to get the first head.

Then the distribution of X is:

XX 1 (H)1 (H) 2(TH)2(TH) 3(TTH)3(TTH) 4(TTTH)4(TTTH) K(TTT…TH)K(TTT…TH)

P(X)P(X) 0.30.3 0.7*0.30.7*0.3 0.7*0.7*0.30.7*0.7*0.3 0.7*0.7*0.7*0.0.7*0.7*0.7*0.33

0.7*0.7*…*0.7*0.30.7*0.7*…*0.7*0.3

Page 4: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

If we repeat an experiment with two outcomes, success/failure, with probability p for success and q=1-p for failure, the number of trials needed to get the first success follows a Geometric distribution, say,

X~Geo(p).

Page 5: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

Similarities and differences between Binomial and Geometric random variable.◦ Similarities: independent trials of the identical

experiment, probabilities of success/failure consistent.

◦ Differences: 1. For Binomial, we know how many trials we have in

total and for Geometric, we don’t know it, actually that number is not of interest.

2. For Binomial, there are usually several possibilities for a specific value of the variable, but for geometric, there is only one. (note: there is a coefficient of a combination for the binomial probability)

Page 6: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

Someone is trying to take the road test to get a driver’s license. If the probability of passing the test is 40%, what is the probability that this person will pass the test at second shot?

Page 7: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

What is the probability that someone will pass the road test in 5 trials?

Given that someone has taken the test 4 times and still has not got the license, what is that person’s chance of passing it the next time?

Page 8: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

If X~Geo(p), then ◦E(X)=1/p◦Var(X)=(1-p)/(p^2)

Page 9: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

On average, how many times does one have to take the test to get the driver’s license?

Page 10: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

In one of the episodes of Planet Earth by BBS, an experiment was recorded. In the experiment, some animal scientists captured a snow leopard and put an instrument with a remote sensor so that they can keep track of her behavior. Also, they can use the instrument to estimate the number of wild snow leopard existing.

Page 11: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

Suppose there are a total of N wild snow leopards, r of them are captured and attached the instrument and the rest N-r are not.

In the future, scientists can keep capturing wild snow leopards and count how many captured ones have the instrument and how many don’t. (assuming snow leopards don’t take the instrument off by themselves).

Page 12: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

In a population of size N, r have a feature of interest and N-r don’t. Then if we take a sample of size n from the population, what is the probability that x units in our sample of size n have that feature?

Page 13: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

Hyper-geometric distribution: If a random variable follows a hyper-

geometric distribution, we say X~HG(N, n, r) and◦ p(x=k)=

◦ Parameters: N: number of elements in the population n: number of elements in the sample r: number of elements in the population with the

desired feature.

Page 14: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

Population of size N, r with desired feature.◦ If we take samples, considered a trial, with

replacement, then each trial is independent with the same probability of getting one with the desired feature. (Binomial)

◦ If we take samples without replacement, then each trial is not independent. Also, the probability of getting one with the desired feature changes across trials. (Hypergeometric)

Page 15: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

If we have 20 books, 4 textbooks and 16 non-textbooks.

A. If we take one book at a time and then put it back, repeat 5 times, what is the probability that we get all 4 textbooks?

Page 16: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

B. If we take one book at a time and do not put it back, repeat 5 times, what is the probability that we get all 4 textbooks?

Page 17: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

C. If we take 5 books out of the 20, what is the probability that we get all 4 textbooks?

Page 18: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

Given that a random variable follows a Hyper-geometric distribution, ◦ E(X)=n*r/N◦ Var(X)=n(r/N)(1-r/N)[(N-n)/(N-1)]

Page 19: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

D. On average, if we take 5 books out of the 20, how many textbooks can we get?

Page 20: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

A. Suppose we randomly draw 5 cards from a deck of 52 cards, what is the probability that there are exactly 2 red cards in our hand?

Page 21: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

B. what is the probability that we get at most two hearts?

Page 22: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

Four players are playing a poker game out of a deck of 52 cards. Each player has 13 cards. Let X be the number of Kings one player may have, and answer the following questions.

1. Is X a discrete or continuous random variable?

2. Find an appropriate probability distribution that can be used to describe X. Also, find the corresponding parameter(s).

Page 23: Geometric and Hyper-geometric Distribution. Geometric Random Variable  Take a fair coin and toss it as many times as needed until you observe a head

3. Find the sample space and X and the probability corresponding to each point in the sample space.