260 likes | 507 Views
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. Let X= number of tosses that is needed. Sample points={H, TH, TTH, TTTH, …} Distribution of X. Geometric Random Variable.
E N D
Geometric Random Variable 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
Geometric Random Variable 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:
Geometric Random Variable 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).
Geometric Random Variable • 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)
Example 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?
Example 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?
Mean and Variance of a Geometric Random Variable • If X~Geo(p), then • E(X)=1/p • Var(X)=(1-p)/(p^2)
Example On average, how many times does one have to take the test to get the driver’s license?
Planet Earth • 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.
The idea behind it… • 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).
To generalize • 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?
This is called… • 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.
Compared with Binomial • 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)
Example I • 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?
Example I • 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?
Example I • C. If we take 5 books out of the 20, what is the probability that we get all 4 textbooks?
More about Hypergeometric • 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)]
Example I • D. On average, if we take 5 books out of the 20, how many textbooks can we get?
Example II • 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?
Example II • B. what is the probability that we get at most two hearts?
Example III • 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).
Example III • 3. Find the sample space and X and the probability corresponding to each point in the sample space.