Statistics 2 LW1 - Probabilities


Probability

  • Probability: The measure of the likelihood that an event will occur (also known as chance or likelihood).

  • Probability is used everywhere, so it is important to know how to interpret it.

Problems in Probability

  • Polls and predictions

Why were the polls wrong?

  • Samples were not representative.

  • Wrong questions were asked.

  • Failure to understand Statistical Measurements.

  • Margin of error.

Relation with Business

  • It helps to make decisions.

    • Compute the probability of an outcome and prepare accordingly (e.g., insurance).

  • It is used for drawing conclusions based on small amounts of data.

    • Often used in research (e.g., market research).

The Birthday Problem

  • Suppose there are 23 people. What is the chance two people share the same birthday?

Probability Rules & Conventions

  • Probability is given the symbol PP. PP is always between 0 and 1 ( 0P10 ≤ P ≤ 1 ). 0 = 0% chance; 1 = 100% chance.

Basic Formulas

  • P=How many times a specific thing happensHow many times all things happenP = \frac{\text{How many times a specific thing happens}}{\text{How many times all things happen}}

  • More formally: P(E)=Number of favorable outcomesTotal number of outcomesP(E) = \frac{\text{Number of favorable outcomes}}{\text{Total number of outcomes}}, where E means Event.

Example

  • Chance of throwing a 6 on a dice:

  • P(throwing a 6)=16=0.1667P(\text{throwing a 6}) = \frac{1}{6} = 0.1667

Multiplication & Addition Rules

  • Multiplication Rule: Used when you want to know the probability of two or more things happening.

  • Example

    • Chance of throwing a 6 AND then throwing a 4: P(throwing a 6)P(throwing a 4)=(1/6)(1/6)=1/36=0.0278P(\text{throwing a 6}) * P(\text{throwing a 4}) = (1/6) * (1/6) = 1/36 = 0.0278

  • Formula: P(A and B)=P(A)P(B)P(A \text{ and } B) = P(A) * P(B)

Exercise 1

  • Research about Pokémon preferences: 70% like Pikachu, 20% pick Squirtle, 50% Charmander, 30% Bulbasaur.

  • Question: Chance that a person does not like Pikachu and chose Squirtle?

Exercise 1 Answer

  • P(person does not like Pikachu)=0.3P(\text{person does not like Pikachu}) = 0.3

  • P(person chose Squirtle)=0.2P(\text{person chose Squirtle}) = 0.2

  • P(person does not like Pikachu AND chose Squirtle)=0.30.2=0.06P(\text{person does not like Pikachu AND chose Squirtle}) = 0.3 * 0.2 = 0.06

Multiplication Rule & Dependence

  • The Multiplication Rule only works if the events are completely independent.

  • Being in one category does not influence the outcome of the other category at all!

  • E.g. Liking (or not liking Pikachu) does not influence whether you chose Squirtle.

Multiplication Rule & Dependence Example

  • Gender and Favorite Television Series are independent; however, preference for Bridgerton and Better Call Saul are not independent.

  • P(a person is female AND prefers Better Call Saul) using multiplication rule:

    • (50/100)(35/100)=0.1750(50/100)*(35/100) = 0.1750

    • In the table, there are 10 women who prefer Better Call Saul.

  • Conclusion: always draw a table!

Addition Rule

  • The Addition Rule is used when we want to know the probability either (or all) of several events occurs.

  • Example: Chance of throwing a 6 OR a 4.

    • P(throwing a 6)+P(throwing a 4)=1/6+1/6=2/6=0.3333P(\text{throwing a 6}) + P(\text{throwing a 4}) = 1/6 + 1/6 = 2/6 = 0.3333

  • Formula: P(A or B)=P(A)+P(B)P(A \text{ or } B) = P(A) + P(B)

Addition Rule

  • The addition rule only works when events are Exclusive (they cannot happen at the same time).

  • When Events are NOT exclusive we use:

    • P(A or B)=P(A)+P(B)P(A and B)P(A \text{ or } B) = P(A) + P(B) - P(A \text{ and } B)

Addition Rule Example

  • What is the chance that a randomly picked person is Female OR likes the Office?

  • Gender and Favorite Television Series are NOT exclusive.

  • The chance that someone is Female OR likes the Office best (or both):

    • 50/100+30/10015/100=0.6550/100 + 30/100 – 15/100 = 0.65

  • P(A or B)=P(A)+P(B)P(A and B)P(A \text{ or } B) = P(A) + P(B) - P(A \text{ and } B)

Exercise 2

  • Research at Arnhem Business School about the preference for type of social media (facebook, Instagram, TikTok).

  • You asked 100 people in total, 60 teachers, 30 people preferred instagram, 10 teachers preferred instagram, 40 teachers and 10 students preferred facebook

  • What is the chance that a randomly picked person is a student or preferred TikTok?

Exercise 2 Solution

  • P(student OR TikTok) = 40/100 + 20/100 – 10/100 = 0.5

Complement Rule

  • The complement rule is used when you want to find out the probability of something NOT happening.

  • P(not A)=1P(A)P(\text{not } A) = 1 – P(A)

    • This can simplify calculations.

The Birthday Problem

  • Suppose there are 23 people. What is the chance two people share the same birthday?

  • It's easier to approach using the complement rule

  • What is the chance that 2 people DO NOT share the same birthday?

    • 365365 x 364365\frac{365}{365} \text{ x } \frac{364}{365}

  • Chance of 23 people NOT sharing the same birthday:

    • 365365 x 364365 x 363365 x 362365 x  x 343365=0.4927\frac{365}{365} \text{ x } \frac{364}{365} \text{ x } \frac{363}{365} \text{ x } \frac{362}{365} \text{ x } … \text{ x } \frac{343}{365} = 0.4927

  • Chance 2 people share the same birthday in a group of 23:

    • 10.4927=0.50731 - 0.4927 = 0.5073

Conditional Probability

  • Conditional probability is when we take a smaller part (a subset) from the total (e.g. only pick women) and calculate a probability within that subset.

  • The notation looks like this: P(AB)P(A|B)

    • Pronounced as: The probability of A given B (Here A is the event and B is the condition)

Conditional Probability Example

  • What is the probability that someone likes TikTok given that they are a student?

  • Or P(TikTok|Student)?

Conditional Probability Example Answer

  • P(TikTokStudent)=P(AB)P(\text{TikTok}|\text{Student}) = P(A|B)

  • There are 30 students who prefer TikTok (A).

  • There are 60 students in total (B).

  • Thus P(AB)=30/60=0.5P(A|B) = 30/60 = 0.5

Conditional Probability: Why it’s important

  • Conditional probability is a recurring problem in medicine.

  • Malaria test is 95% accurate; people have a 1% chance of being affected with Malaria.

  • If you have Malaria, there is a 5% chance that you are told you are not sick.

  • If you do not have Malaria, there is a 5% chance you are told you are sick.

  • If the test result is positive (the test says you have Malaria), what is the chance you are not actually sick?

  • In other words: P(not sick|positive test result)?

Malaria Test Calculation

  • Chance of having malaria and tested positive = 0.01*0.95

  • Chance of having malaria and tested negative = 0.01*0.05

  • Chance of not having malaria and tested positive = 0.99*0.05

  • Chance of not having malaria and tested negative = 0.99*0.95

  • Chance of testing positive = 0.010.95 + 0.990.05

  • Chance of not having malaria | Chance of testing positive = 0.990.05 / (0.010.95 + 0.99*0.05) = 0.8390

Conditional Probability: Why it’s important Answer

  • Let's say we ask 10,000 people

    • 100 will have Malaria, 95 told they have it, 5 told they don't.

    • 9900 will not have Malaria, 9405 told they don't have it, 495 told they do.

  • Therefore, in total 495+95 = 590 people will be told they have Malaria

  • The chance that you are told you have Malaria even though you don’t is therefore: 495/590 = 0.8390

Contingency Table

  • Very useful for understanding conditional probabilities.

  • Contingency table with counts gives a “cleaner” overview.

Probability and Keywords

  • Each rule is generally tied to a specific keyword:

    • Multiplication Rule: AND

    • Addition Rule: OR

    • Conditional Rule: IF

    • Complement Rule: NOT

Probability and Keywords

  • Multiplication Rule: AND, Events are independent, contingency table if not independent

  • Addition Rule: OR, Events are exclusive, contingency table if non-exclusive, subtract P(A and B)P(A \text{ and } B)

  • Conditional Rule: IF, Use contingency table or tree diagram

  • Complement Rule: NOT

Dependent Independent Events | Flipping a coin Twice

  • P(Twice heads)=0.50.5=0.25P \text{(Twice heads)} = 0.5*0.5 = 0.25

  • P(First heads then tails)=0.50.5=0.25P \text{(First heads then tails)} = 0.5*0.5 = 0.25

  • P(First tails then heads)=0.50.5=0.25P \text{(First tails then heads)} = 0.5*0.5 = 0.25

  • P(Twice tails)=0.50.5=0.25P \text{(Twice tails)} = 0.5*0.5 = 0.25

Dependent & Independent occurrences

  • Events are independent when the outcome of Event A does not influence the outcomes of event B.

  • What you had on your first coin flip does not influence what happens on the second flip.

  • Sometimes it happens that event A does influence event B. Then the events are Dependent.

Dependent Events

  • Need to two students from a class (of 10) to help me out.

  • In this class there are 6 girls and 4 boys

  • The chance that the first person I pick is a girl = 6/10

  • The chance that the second person I pick is also a girl = 5/9

Dependent Events: Tree Diagram

  • P(Two girls)=(6/10)(5/9)=0.3333P \text{(Two girls)} = (6/10) * (5/9) = 0.3333

  • P(First girl then boy)=(6/10)(4/9)=0.2667P \text{(First girl then boy)} = (6/10) * (4/9) = 0.2667

  • P(First boy then girl)=(4/10)(6/9)=0.2667P \text{(First boy then girl)} = (4/10)*(6/9) = 0.2667

  • P(Twice boy)=(4/10)(3/9)=0.1333P \text{(Twice boy)} = (4/10)*(3/9) = 0.1333