Chapter 7 Wednesday, May 26 th
Random event A random event is an event that the outcome is unpredictable. Example: There are 45 students in this class. What is the probability that if I select one student, student A will be selected? Random event in the example above is student A is selected
Probability bilit To all random events we can assign probabilities. Probability tell us how likely is a random event possible to happen. Probability is a number between 0 and 1. The sum of the probability bilit of all possible outcomes is equal to 1.
Probability interpretation in the long run Let s say I toss a coin. I know that the probability of observing a Head is 0.5 and the probability of observing atailis0.5. is Now let s say that I toss a coin 3 times. Then I can get either 3 Heads or 2 Heads and 1 Tail or 1 Head 2 Tails or 3 Tails Then why we say the probability of observing a Head is 0.5?
Probability interpretation in the long run This is a case where the probability is defined as the proportion p of times something will occur over the long run. Long run = multiple repetition of the same experiment. So if I toss a coin 1000 times I expect around half of the times to get a Head.
Different ways to express a probability Let s say that I am flipping a coin. The following expressions are equivalent: The proportion of times I will get a Head is about 0.5 About 50% of all the times I will toss a coin I will get a Head The probability to get a Head is 0.5
Sample space All possible outcomes of an experiment compose the sample space. What is my sample space if I toss a coin? What is my sample space if I toss a coin 3 What is my sample space if I toss a coin 3 times?
Simple event Each event in a sample space is called a simple event. What are the simple events when I toss a coin? What are the simple events when I toss a coin 3 p times?
Event Event is a collection of simple events
Complementary events One event A is the complement of another event B if: A and B do not contain the same simple events. If we put together th the two events A and B we get the whole sample space We denote the complement of an event A C P A 1 P A as A C. Also
Example Let s say I roll a die. What is my sample space? If I have the events A= the outcome of the die is 1 or 2, B= the outcome of the die is greater or equal to 4 C= the outcome of the die is greater or equal to 3 Is A and B complementary events? Is A and C complementary events? Is B and C complementary events?
Mutually Exclusive events Two events are mutually exclusive (or disjoint) if they do not contain any of the same simple events. When two events are mutually exclusive then P Aor B P A P B Example: I have to select a number between 0 and 9. Let A= select a number less or equal to 2. Let B= select a number greater or equal to 5 What is P(A) and P(B)? What is P(A or B)?
Independent d events Two events are independent, if knowing that one event will occur then this does not change the probability of the second event. Two events are dependent, if knowing that one event will happen, then the probability of the second event changes.
Example Let say we toss a coin two times and let: A= first toss is a Head -> P(A)=0.5 B= first toss is a Tail -> P(B)=0.5 C= second toss is a Tail -> P(C)=0.5 A and B are dependent because if I know that A will happen then B definitely it will not happen and so P(B if A happens)=0 A and C are independent because if A happens that will not affect the outcome of the second experiment.
Conditional probability bilit In the example in the previous slide we are interested about P(B if A happens). This is called the conditional probability and is denoted as P(B A) or P(B given A) Conditional probability of the event B given that A occurs, is called the probability that B will happen if we know that A has happened
Example Let say that I ask a sample of students in Penn State and I get the answers that among the male students 25% have tried marijuana at least once and among the female students 15% have tried marijuana at least once Now if I randomly choose a student. What is the: P(he has tried marijuana is a male)=? P(she has tried marijuana is a female)=?
Rules of probability bilit We will see now four rules that will help us calculate the probabilities. Rule 1: The probability that one event will not occur. Rule 2: The probability that either of two events will occur Rule 3: The probability that two or more events will occur Rule 4: Conditional probability
Rule 1 We want to calculate the probability that event A will not happen. This is the same as calculating P(A C ). We know that the formula of that is: C P A 1 P A Example: I have 45 students in my class. I want to select one to answer one exercise. What is the probability that student A will not be selected?
Rule 2 If I have two events A and B and I want to see what is the probability that either A or B or both will happen then: General Case: P(A or B) = P(A) + P(B) - P(A and B) Mutually y exclusive events: P(A or B) = P(A) + P(B)
Example I ask 1000 students in Penn State if they have ever tried marijuana, and if they have ever tried ecstasy. The results are as follows: Marijuana Yes No Total Ecstasy Yes 50 100 150 No 200 650 850 Total 250 750 1000
Example If I select a random student from Penn State what will be the probability that they have tried either marijuana or ecstasy or both?
Rule 3 To find the probability that two events occur at the same time, that is events A and B happen simultaneously we have: General case: P(A and B) = P(A)P(B/A)=P(B)P(A/B) Independent p events: P(A and B) = P(A)P(B)
Example Let say that I ask a sample of students in Penn State and I get the answers that among the male students 25% have tried marijuana at least once and among the female students 15% have tried marijuana at least once. Also let s assume that my sample is consisted of males at 55% and females at 45% Let A= Select a male Let B= Select someone that have tried marijuana
Example Now if I randomly select a student what is P(A and B) = P(A)P(B A)=P(B)P(A B)?? ( ) ( ) ( ) First note that P(B A)=0.25 Also note that P(A B) is unknown. So P(A and B)=..?
Rule 4 To calculate the conditional probability of two events all you have to do is to restate rule 3. Rule 3 says P(A and B) = P(A)P(B A)=P(B)P(A B) Rule4says: P Aand B P B A, P A B P A P Aand B P B
Example Let say I throw a die and I am interested for two events A= I get an even number, P(A)=1/2 B= I get a number greater or equal to 3, P(B)=2/3 What is P(A and B)? What is P(A B)?
Sampling with or without replacement A sample is drawn with replacement if individuals selected are eligible to get re- selected. A sample is drawn without replacement if all individuals can be selected one time only.
Example Let s say I am asking a question in a class of 45 students. Let s say I choose student A to answer it. Now let s say that I am asking a second question. What is the probability of student B to answer the second question if student A is allowed to answer the second question? if student A is not allowed to answer the second question?
Another useful formula C P B P Aand B P A and B
Baye s Rule Using the formula in previous slide: P Aand B P A B P B P Aand B P B A P A P B A C P A C
Tree Diagrams An easy way to view probabilities is by constructing a tree diagram. Example: Assuming that in Penn State we have 40% male students and 60% female students. Now let s assume that among male students 85% owns a car and among female students 90% owns a car. Construct a tree diagram. Now, let s make things more complicated. Among the male that have a car, 40% own an American model while among women 30% own an American model.