1 / 18

Nested Problem and extra

Nested Problem and extra. How to solve a probability problem. 1. Read the problem carefully. 2. Answer the following questions: A. What is the random variable of interest in the problem? B. How can I find the pmf of the r.v.?

Download Presentation

Nested Problem and extra

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Nested Problem and extra

  2. How to solve a probability problem • 1. Read the problem carefully. • 2. Answer the following questions: • A. What is the random variable of interest in the problem? • B. How can I find the pmf of the r.v.? • 1. If this r.v. follows a specific distribution (binomial, Poisson, HG), find the parameters. • 2. If can not tell the distribution, create the pmf chart. • C. Whether the problem asks for probability, expected value or variance? • 3. Check the cheat sheet for corresponding formula • 4. Always remember some tricks: e.g. use complement

  3. Example I • A corner of the library was on fire and a librarian was trying to remove as many books from that place as possible. There are 120 volumes of tax code and 80 textbooks stored in that. After the mission is done, a count shows that there are 100 books rescued and 60 of them are textbooks. Do you think the librarian had some selection bias when he/she was rescuing those books?

  4. Example I • Following the steps • 1. What is the random variable of interest in this problem? Is it discrete or continuous? X=number of textbooks rescued and it is discrete • 2. What probability distribution does this r.v. follow? What is/are the parameter(s) for that distribution? X~HG(200, 100, 80) • 3. Answer the question. • P(X=60)=80C60*120C40/200C100=4.47268E-09 • Since the probability is very small, there may be some selection bias involved.

  5. Example II Peter, the family guy, is fishing at a pond. Two thirds of the fish in the pond are white bass and one third are rainbow trout. He decides to stop when he gets the first trout or 3 white bass. Assuming that he will get a fish each time trying regardless of the time. • Let X be the number of times Peter has to try before he stops, find the pmf of X. x p(x) • 1/3 • 2/9 • 4/9

  6. Example II • Let Y be the number of fish Peter may take home. Find the pmf of Y. • Same as X. • If Peter does that every week, on average, how many fish can he take home each time? • E(Y)=1*1/3+2*2/9+3*4/9=19/9

  7. Example II • On the 10th time Peter went fishing, before he got any fish, he was caught by a policeman. Peter was told that it is illegal to fish in the pond and a fine will be imposed based on the number of fish he has got from the pond. Peter was scared and confessed EVERYTHING, but he could not remember how many fish he has got from the pond. The policeman therefore decided to square the number of fish Peter got each time and fine him $60 per fish based on that. How much do you think Peter will pay?

  8. The money Peter expect to pay is: • $60*9*E(Y^2) • Using the formula E(Y^2)=var(Y)+[E(Y)]^2 and plug in E(Y)=19/9 and Var(Y)=62/9, we have E(Y^2)=47/9 • Finally, Peter expect to pay 60*9*47/9=$2820

  9. Example III • Two players, A and B, are playing a card game. They start with a deck of 26 cards with all clubs and diamonds removed. A will deal 13 cards at random to B and A wins if he gets more Ace than B. If both A and B get one Ace, the one with spade Ace wins. They repeat the game 10 times. Find the probability that A wins 6 times. Assuming each game is independent, the number of games A wins follows a binomial distribution with parameters (10 and p)

  10. Example III • Step 1, find p. • A wins when he has two Aces or spade Ace, let’s find the probability of each event separately. • A. A has two Aces: let X1 be the number of Ace at A’s hand, then apparently, X1~HG(26, 13, 2), therefore P(X1=2)=2C2*24C11/26C13=0.24 • B. A has only the spade Ace: we can calculate the probability directly, which is 24C12/26C13 =0.26(note that, we don’t want to use 25C12 on the top since in that case, it will also include the possibilities with 2 Aces) • Finally, P(A wins)=0.24+0.26

  11. Example III • Step 2, find the probability that A wins 6 times. • Let Y be the number of times A wins and Y~BIN(10, 0.5) • P(Y=6)=10C6*0.5^10=0.205 What if we want to calculate the probability that A wins 5 times? Then P(Y=5)=10C5*0.5^10=0.246

  12. Example III • If they repeat the game 100 times, how many times do you expect B to win? • X=number of times B wins and X~BIN(100,0.5) • E(X)=50

  13. Example IV • Someone wants to open a store at downtown Lafayette. He has decided to have his store open Monday through Saturday but has not decided the hours yet. He was torn between opening at 8 or 9. He is willing to open the store at 8 if there are more than 6 customers visiting between 8 and 9 for at least four days of a week. A quick research told him that on average, there are about 8 customers visiting a store in the neighborhood between 8 and 9. What is the probability that the storekeeper starts his business at 8?

  14. Example IV • This is also an example of a nested problem. • The storekeeper’s decision is based on the number of days from Mon. to Sat. that there are more than 10 customers visiting his store. This number follows a binomial distribution. • For a binomial r.v., we need to figure out the two parameters, n and p to be able to work on it. • In this case, n=6, Monday through Saturday. • p depends on the number of customers visiting, that is a Poisson r.v. with a mean of 8.

  15. Example IV • X=number of days with more than 6+ customers visiting between 8 and 9 and X~BIN(6, p), where p is the probability that 6+ customers visit between 8 and 9 on one day. • Need to find p first: • Y=number of customers visiting between 8 and 9 on one day and Y~Poi(8) • p=P(Y>6)=1-P(Y<=6)= • 1-[P(Y=0)+P(Y=1)+P(Y=2)+P(Y=3)+P(Y=4)+P(Y=5)+p(Y=6)]=0.69 • Therefore X~BIN(6, 0.69)

  16. Example IV • The storekeeper will start at 8 when X>=4, the probability is then: • P(X>=4)=P(X=4)+P(X=5)+P(x=6)=0.73. • Therefore, there is 73% probability that the store keeper will open the store at 8.

  17. Example IV • Assume after a week’s trial business, the shop keeper finally decided to open the store at 9am instead of 8, then what is the probability that he had 6+ customers visiting between 8 and 9 on only three days of the week. • Since the shopkeeper will open the store at 8 if he has 6+ customers visiting for at least four days of the week, he not opening the store at 8 means he either has 0 or 1 or 2 or 3 days with 6+ customers. • That probability is 1-0.73=0.27

  18. Example IV • This is a Bayes theorem problem. We know the outcome, the store is not opened at 8, and we want to figure out one of the probability that one of the possible reasons that happened, there are only 3 days that 6+ customers visited. • Using Bayes Theorem: the answer is • P(3 days with 6+ customers|not open at 8) • which is P(3 days with 6+ customers| 0 or 1 or 2 or 3 days with 6+ customers) • =P(Y=3)/0.27=0.2/0.27=0.74

More Related