CHAPTER 5 REVIEW A RANDOM PHENOMENON is a situation where we know what outcomes could happen but we dont know in what order they did or will happen But we can calculate the probability with which each of those outcomes could occur. people are bad at identifying random samples so we rely on coin flips or random number tables to simulate randomness. Say if you want to simulate randomnes using a random number table and simulate rolling a die 10 times. In this example we choose a random line say 30, recall that for a die there 6 possible outcomes 1-6, so in the table eliminate any numbers greater 6. Read left to right and you get a series of numbers. This is an example of simulating randomness. RANDOMNESS TO PROBABILITY Say you have an itunes library of 1000 songs and there are 5 iron maiden songs in it. what is the probability that when you hit shuffle you get an iron maiden song? ${1000}=0.005$ DEFINITIONS OF PROBABILITY A FREQUENTIST: The probability of an event is its long-run relative frequency. Theoretical: we may not be able to predict which song we get each time we hit shuffle, but we know in the long run of the library, 5 out of 1000 will be iron maiden songs. Empirical: Listen to 100 songs on shuffle and 4 of them are iron maiden songs. empirical probability is then 4/100=0.04 a BAYESIAN: we wont use much in this class Definitions of Probability for any random phenomenon, each attempt is called a TRIAL and each trial generates an outcome. OUTCOME Each time you hit shuffle, thats a trial The songs that plays as a result of the shuffle is an outcome A SAMPLE SPACE is the collection of all possible OUTCOMES of a trial Sample space would be the 1000 itunes songs a comination of outcomes is called an EVENT for example, playing 2 iron maiden songs in a row SAMPLE SPACE a couple has two kids, what is the sample space for the gender of the kids? Well there are 4 possibilities S=BB,BG,GB,GG The probability that both will be boys is 0.25. INDEPENDENCE when thinking about what occurs with combinations of outcomes, things are simplifies if the individual trials are independent - This means that the outcome of one event doesnt influence the outcome or change the next outcome. - If the itunes shuffle is really random then each of the songs played are independent example for coing toss trial: Each coin toss outcome: Heads or tails probability: P(h)=P(t)=0.5 each time we flip we dont know which side will come up but in the long run, the probabilities will be 0.50 for each side. sample space: tossed once: s=h,t tossed twice:s=hh,tt,ht,th LAW OF LARGE NUMBERS - The law of large numbers says that the long run relative frequency of repeated indpendent events gets closer and closer to the true relative frequency as the number of trails increases. - if a coin is tossed many times, the overall percentage will settile down to about 50% as the umber of tosses increases - this is why probability is defined as a long run relative frequency event IMPOSSIBILITY TO A CERTAINTY probabilities must be between 0 and 1. 0 means impossible and 1 is certainty. COMPLIMENT RULE Set of ourcomes that are not in the event A is called the compliment of A, denoted AC. The probability of an event occuring is 1-Probability(it doesnt occur). \[Prob(A^C)=1-Prob(A)\] DISJOINT EVENTS Events that have no outcomes in common are called disjoint( or mutually exclusive). Examples: The outcome of a coing toss cant be a head and a tail. so disjoint student cant fail and pass an exam:disjoint ADDITION RULE for two disjoint events A and B (think like heads and tails for coins), the probability that one OR the other occurs is the sum of the two probabilies. \[Prob(A or B)=P(A)+P(B)\] MULTIPLICATION RULE For two independent events A and B, the probability that both A AND B occur is the product of the individual events together. \[Prob(A and B)=Prob(A)Prob(B)\] EXAMPLES In a multiple choice exam there are 5 questions and 4 choices for each question (a, b, c, d). Nancy has not studied for the exam at all, and decided to randomly guess the answers. What is the probability that she gets the first question right? 0.25 What is the probability that she gets the second question right? 0.25 What is the probability that the first question she gets right is the 5th question? if she get just the fifth one right that means the first 4 were wrong and the last one was right. so that is (0.75)⁴ * 0.25 = 0.0791 What is the probability that she gets all the questions right? (0.25)⁵ = 0.0010 What is the probability that the first question she gets at least one question right? They are asking for at least once question right so using the compliment rule, which is to say 1-probability(none right)=1-probability(all wrong)=1 − (0.75)⁵ = 0.7627 INDEPENDENT VS DISJOINT can two events be independent and disjoint? Remember independence means that the outcome of an event doesnt influence the outcome of another event. Disjoint means no outcomes in common like not being able to have heads or tails. If we know that the outcome of a coin toss was head, we know its not tails. So whether or not the outcome is tails it DEPENDS on whether or not the outcomes was heads. so that would be called disjoint and dependent. - disjoint events cannot be independent - since we know that disjoints have no outcomes in common, then we know if one occured, the other didnt. - just because two events can occur at the same time doesnt mean they need to be dependent. - two students can get an A in a class but they may not have studied together etc - if you did study together and both got As then your grade could be dependent EXAMPLES A middle school estimates that 20% of its students miss one day of school per semester due to sickness, 13% miss two days, and 5% miss three or more days. What is the probability that a student chosen at random doesn’t miss any days of school due to sickness? Not missing any school is the compliment of missing all days. so prob(nomisses)=1 − (0.20 + 0.13 + 0.05)=0.62 What is the probability that a student chosen at random misses no more than one day? prob(atmost1day)=Prob(nomisses)+prob(1miss)=0.82 If a parent has two kids at this middle school, what is the probability that neither will miss any school? prob(neithermissany)=(prob(nomiss))²=0.3844 We used the multiplication rule to calculate the probability in the previous example. a) What must be true about these kids to make that approach valid? independence. b) Do you think this assumption is reasonable? yes. what is the probability that one kid misses some school and the other doesn’t miss any? Prob(one misses some school)=prob(1 kid misses some school and the other doesnt)+prob(1st kid doesnt miss any school and the 2nd does)=0.38*0.62+0.62*0.38)=0.4712 GENERAL ADDITION RULE If A and B are disjoint,\[Prob(A or B)=prob(A)+prob(B)\] If A and B are not disjoint(independent) \[ prob (A or B)=Prob(A)+prob(B)-prob(A and B)\] EXAMPLE In a class where everyone’s native language is English, 70% of students speak Spanish, 45% speak French as a second language and 20% speak both. Assume that there are no students who speak another second language. What is the probability that a randomly selected students speaks Spanish or French? This is independent because its students who speak spanish or french, those dont effect each other. by the general addition rule then, prob(SpanishorFrench)=prob(spanish)+prob(french)−prob(both)=.70 + .45 − .20 = 0.95 CONDITIONAL PROBABILITY Bayes theorem: \[Prob(A\vert B)={Prob(B)}\] Say you have a chart that has smokers and there sex amd the total people were 1691. if people who smoke are 421 and female are 234 of the smokers a question could be, what is the probability that a randomly chosen smoker is female? This follows what bayes theorem is saying. probabilities of A given B. In this example we have the probability of find smokers given they are female form. so \[prob(F\vert S)={421/1691}=234/421\] this is something we could have guessed but it could get trickier. BACK TO MISSING SCHOOL EXAMPLE What is the probability that a randomly selected student speaks French given that they speak Spanish? prob(F|S)=Prob(FandS)/prob(S)=.20/.70 = 0.29 Check professors notes for burger example. GENERAL MULTIPLICATION RULE If A and B are independent, \[Prob(A and B)=Prob(A)*Prob(B)\] If A and B do not need to be independent, \[Prob( A and B)=Prob(A\vert B)*Prob(B)\] ONLY ASSUME INDEPENDENCE IF THE QUESTION SPECFIES IT OR YOU CHECKED FOR YOURSELF CHECKING FOR INDEPENDENCE USING CONDITIONAL PROBABILITIES if Prob(A)=Prob(A|B) then the events are independent. INDEPENDENT VS DISJOINT-RECAP if A and B are disjoint: - Prob(A and B)=0 - A and B are not independent If A and B are not disjoint: - Prob(A and B)>0 - A and B may or not be independent