Top Banner
Chapter 4. Probability: The Study of Randomness http://mikeess-trip.blogspot.com/2011/06/gambling.html 1
56

Chapter 4. Probability: The Study of Randomness 1.

Dec 17, 2015

Download

Documents

Jayson Fisher
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 4. Probability: The Study of Randomness  1.

1

Chapter 4. Probability: The Study of Randomness

http://mikeess-trip.blogspot.com/2011/06/gambling.html

Page 2: Chapter 4. Probability: The Study of Randomness  1.

2

Uses of Probability• Gambling• Business

– Product preferences of consumers– Rate of returns on investments

• Engineering– Defective parts

• Physical Sciences– Locations of electrons in an atom

• Computer Science– Flow of traffic or communications

Page 3: Chapter 4. Probability: The Study of Randomness  1.

3

4.1: Randomness - Goals• Be able to state why probability is useful.• Be able to state what randomness and probability

mean.• Be able to identify where randomness occurs in

particular situations.• Be able to state when trials are independent.

Page 4: Chapter 4. Probability: The Study of Randomness  1.

4

Trial and Experiment

• Trial• Experiment

Page 5: Chapter 4. Probability: The Study of Randomness  1.

5

Random and Probability

• We call a phenomenon random if individual outcomes are uncertain but there is nonetheless a regular distribution of outcomes in a large number of repetitions.

• The probability of any outcome of a chance process is the proportion of times the outcome would occur in a very long series of repetitions.

Page 6: Chapter 4. Probability: The Study of Randomness  1.

6

Frequentist Interpretation

Page 7: Chapter 4. Probability: The Study of Randomness  1.

7

Independent

• Independent: the outcome of each situation is not influenced by the result of the previous trial

• Examplea) What is the probability of drawing a heart?b) What is the probability that I will draw a

heart on the second draw?

Page 8: Chapter 4. Probability: The Study of Randomness  1.

8

4.2: Probability Models - Goals• Be able to write down a sample space in specific

circumstances.• Be able to state and apply the five probability rules

(this goal will reappear later)• Be able to determine what type of probability is

given in a certain situation.• Be able to assign probabilities assuming an equally

likelihood assumption.

Page 9: Chapter 4. Probability: The Study of Randomness  1.

9

Probability Models

• The sample space S of a chance process is the set of all possible outcomes.

• An event is an outcome or a set of outcomes of a random phenomenon. That is, an event is a subset of the sample space.

• A probability model is a description of some chance process that consists of two parts: a sample space S and a probability for each outcome.

Page 10: Chapter 4. Probability: The Study of Randomness  1.

10

Sample SpaceWhat is the sample space in the following

situations? Are each of the outcomes equally likely?

a) I roll one 4-sided die.b) I roll two 4-sided dice.c) I toss a coin until the first head appears.d) A mortgage can be classified as fixed rate (F) or

variable (V) and we are considering 2 houses.e) The number of minutes that a college student

uses their cell phone in a day.

Page 11: Chapter 4. Probability: The Study of Randomness  1.

11

Probability Rules

Rule 1. The probability P(A) of any event A satisfies 0 ≤ P(A) ≤ 1.

Rule 2. If S is the sample space in a probability model, then P(S) = 1.

Rule 3. addition rule for disjoint events: If A and B are disjoint, P(A or B) = P(A) + P(B).

Rule 4: The complement of any event A is the event that A does not occur, written AC.

P(AC) = 1 – P(A).

Page 12: Chapter 4. Probability: The Study of Randomness  1.

12

Examples: Probability Rules

Additivity:a) Roll two 4-sided dice: What is the probability

that the sum is 2 or 3?b) Mortgage: What is the probability that both

houses have the same type of mortgage?

Page 13: Chapter 4. Probability: The Study of Randomness  1.

13

Examples: Probability Rules

Compliment:c) Roll two 4-sided dice: What is the probability

that the sum is greater than 2?d) Mortgage: What is the probability that both

houses do not have fixed mortgages?

Page 14: Chapter 4. Probability: The Study of Randomness  1.

14

Types of Probabilities

• Subjective• Empirical

• Theoretical (equally likely)

Page 15: Chapter 4. Probability: The Study of Randomness  1.

15

Example: Types of ProbabilitiesFor each of the following, determine the type of probability and then answer the question.1) What is the probability of rolling a 2 on a fair

4-sided die?2) What is the probability of having a girl in the

following community?

3) What is the probability that Purdue Men’s Basketball team will beat IU later this season?

Girl 0.52Boy 0.48

Page 16: Chapter 4. Probability: The Study of Randomness  1.

16

Examples: Legitimate Probabilities

Which of the following probabilities are legitimate? Why or why not?

Outcome #1 #2 #3 #4 #5

1 0.25 0 0.1 0.5 1.12 0.25 0.1 0.1 -0.2 0.13 0.25 0.5 0.1 0.3 0.14 0.25 0.4 0.1 0.4 0.1

Page 17: Chapter 4. Probability: The Study of Randomness  1.

17

Probability RulesRule 5. Multiplication Rule for Independent

Events. Two events A and B are independent if knowing

that one occurs does not change the probability that the other occurs.

If A and B are independent:P(A and B) = P(A) P(B)

Page 18: Chapter 4. Probability: The Study of Randomness  1.

18

Example: Independence

Are the following events independent or dependent?

1) Winning at the Hoosier (or any other) lottery.2) The marching band is holding a raffle at a

football game with two prizes. After the first ticket is pulled out and the winner determined, the ticket is taped to the prize. The next ticket is pulled out to determine the winner of the second prize.

Page 19: Chapter 4. Probability: The Study of Randomness  1.

19

Example: Independence

1. Deal two cards without replacementA = 1st card is a heart B = 2nd card is a heartC = 2nd card is a club.a) Are A and B independent?b) Are A and C independent?

2. Repeat 1) with replacement.

Page 20: Chapter 4. Probability: The Study of Randomness  1.

20

Disjoint vs. Independent

In each situation, are the following two events a) disjoint and/or b) independent?1) Draw 1 card from a deck

A = card is a heart B = card is not a heart2) Toss 2 coins

A = Coin 1 is a head B = Coin 2 is a head3) Roll two 4-sided dice. A = red die is 2 B = sum of the dice is 3

Page 21: Chapter 4. Probability: The Study of Randomness  1.

21

Example: Complex Multiplication Rule (1)The following circuit is in a series. The current

will flow only if all of the lights work. Whether a light works is independent of all of the other lights. If the probability that A will work is 0.8, P(B) = 0.85 and P(C) = 0.95, what is the probability that the current will flow?

http://www.berkeleypoint.com/learning/parallel_circuit.htmlA B C

Page 22: Chapter 4. Probability: The Study of Randomness  1.

22

Example: Complex Multiplication Rule (2)The following circuit to the right is

parallel. The current will flow if at least one of the lights work. Whether a light works is independent of all of the other lights. If the probability that A will work is 0.8, P(B) = 0.85 and P(C) = 0.95, what is the probability that the current will flow?

http://www.berkeleypoint.com/learning/parallel_circuit.html

A

B

C

Page 23: Chapter 4. Probability: The Study of Randomness  1.

23

Example: Complex Multiplication Rule (3)A diagnostic test for a certain disease has a

specificity of 95%. The specificity is the same as true negative, that is the test is negative when the person doesn’t have the disease.

a) What is the probability that one person has a false positive (the test is positive when they don’t have the disease)?

b) What is the probability that there is at least one false positive when 50 people who don’t have the disease are tested?

Page 24: Chapter 4. Probability: The Study of Randomness  1.

24

4.3: Random Variables - Goals• Be able to define what a random variable is.• Describe the probability distribution of a discrete

random variable.• Use the distribution of a discrete random variable to

calculate probabilities of events.• Describe the probability distribution of a continuous

random variable.• Use the distribution of a continuous random

variable to calculate probabilities of events.

Page 25: Chapter 4. Probability: The Study of Randomness  1.

25

Random Variables

• A random variable takes numerical values that describe the outcomes of some chance process.

• The probability distribution of a random variable gives its possible values and their probabilities.

Page 26: Chapter 4. Probability: The Study of Randomness  1.

26

Discrete Random Variables

• A discrete random variable X takes a fixed set of possible values with gaps between.

• They are usually displayed in table form

• These probabilities must satisfy the following:1. 0 ≤ pi ≤ 1

2. Sum of all the pi’s is 1

value x1 x2 …probability p1 p2 …

Page 27: Chapter 4. Probability: The Study of Randomness  1.

27

Examples: Probability Histograms

1 2 3 4-0.1999999999999996.10622663543836E-16

0.2000000000000010.4000000000000010.600000000000001

#1

Outcomes

Prob

abili

ty

1 2 3 40

0.20.40.6

#2

Outcomes

Prob

abili

ty

Page 28: Chapter 4. Probability: The Study of Randomness  1.

28

Example: Discrete Random Variable

In a standard deck of cards, we want to know the probability of drawing a certain number of spades when we draw 3 cards. Let X be the number of spades that we draw.a) What is the distribution?b) What is the probability that you draw at least

1 spade?c) What is the probability that you draw at least

2 spades?

Page 29: Chapter 4. Probability: The Study of Randomness  1.

29

Example: Discrete (cont.)

0 1 2 3-0.1

0.1

0.3

0.5

Spades Example

Number of Spades

Prob

abili

ty

Page 30: Chapter 4. Probability: The Study of Randomness  1.

30

Normal Distribution: Example

A particular rash has shown up in an elementary school. It has been determined that the length of time that the rash will last is normally distributed with mean 6 days and standard deviation 1.5 days.

a) What is the percentage of students that have the rash for longer than 8 days?

b) What is the percentage of students that the rash will last between 3.7 and 8 days?

Page 31: Chapter 4. Probability: The Study of Randomness  1.

31

4.4: Means and Variances of Random Variables - Goals

• Be able to use a probability distribution to find the mean of a discrete (or continuous) random variable.

• Be able to use the law of large numbers to describe the behavior of the sample mean.

• Calculate means using the rules for means.• Be able to use a probability distribution to find the

variance of a discrete (or continuous) random variable.

• Calculate variances using the rules for variances for both correlated and uncorrelated random variables.

Page 32: Chapter 4. Probability: The Study of Randomness  1.

32

Formulas for the Mean of a Random Variable

• Discrete

Page 33: Chapter 4. Probability: The Study of Randomness  1.

33

Example: Expected value

What is the expected value of the following:a) A fair 4-sided die

X 1 2 3 4

Probability 0.25 0.25 0.25 0.25

Page 34: Chapter 4. Probability: The Study of Randomness  1.

34

Statistical Estimation

What would happen if we took many samples?

Population

Sample

Sample

Sample

Sample

Sample

Sample

Sample

Sample

?

Page 35: Chapter 4. Probability: The Study of Randomness  1.

35

Law of Large Numbers

• Draw independent observations at random from any population with finite mean µ. The law of large numbers says that, as the number of observations drawn increases, the sample mean of the observed values gets closer and closer to the mean µ of the population.

• Our intuition doesn’t do a good job of distinguishing random behavior from systematic influences. This is also true when we look at data.

Page 36: Chapter 4. Probability: The Study of Randomness  1.

36

Rules for MeansRule 1: If X is a random variable and a and b are

fixed numbers, then:µa+bX = a + bµX

Rule 2: If X and Y are random variables, then:µXY = µX µY

Rule 3: If X is a random variable and g is a function of X, then:

Page 37: Chapter 4. Probability: The Study of Randomness  1.

37

Example: Expected ValueAn individual who has automobile insurance form a certain company is randomly selected. Let X be the number of moving violations for which the individual was cited during the last 3 years. The distribution of X is

a) Verify that E(X) = 0.60. b) If the cost of insurance depends on the following

function of accidents, g(y) = 400 + (100y -15), what is the expected value of the cost of the insurance?

X 0 1 2 3px 0.60 0.25 0.10 0.05

Page 38: Chapter 4. Probability: The Study of Randomness  1.

38

Example: Expected ValueFive individuals who have automobile insurance from a certain company are randomly selected. Let X and Y be two different accident profiles in this insurance company:

E(X) = 0.60

E(Y) = 0.95 c) What is the expected value the total number of accidents

of the people if 2 of them have the distribution in X and 3 have the distribution in Y?

X 0 1 2 3px 0.60 0.25 0.10 0.05

Y 0 1 2 3pY 0.40 0.35 0.15 0.10

Page 39: Chapter 4. Probability: The Study of Randomness  1.

39

Example: Expected valueAn individual who has automobile insurance form a certain company is randomly selected. Let X be the number of moving violations for which the individual was cited during the last 3 years. The distribution of X is

d) Calculate E(X2).

X 0 1 2 3px 0.60 0.25 0.10 0.05

Page 40: Chapter 4. Probability: The Study of Randomness  1.

40

Variance of a Random Variable

= E(X2) – (E(X))2

Page 41: Chapter 4. Probability: The Study of Randomness  1.

41

Example: Variance

An individual who has automobile insurance form a certain company is randomly selected. Let X be the number of moving violations for which the individual was cited during the last 3 years. The distribution of X is

e) Calculate Var(X).

X 0 1 2 3px 0.60 0.25 0.10 0.05

Page 42: Chapter 4. Probability: The Study of Randomness  1.

42

Rules for VarianceRule 1: If X is a random variable and a and b are

fixed numbers, then:σ2

a+bX = b2σ2X

Rule 2: If X and Y are independent random variables, then:

σ2XY = σ2

X + σ2Y

Rule 3: If X and Y have correlation ρ, then:

σ2XY = σ2

X + σ2Y 2ρσXσY

Page 43: Chapter 4. Probability: The Study of Randomness  1.

43

Correlation

i i

X Y

(x x)(y y)r

n 1 s s

i X i Y X,Y

X Y

(x )(y )p

Page 44: Chapter 4. Probability: The Study of Randomness  1.

44

Example: VarianceAn individual who has automobile insurance form a certain company is randomly selected. Let X be the number of moving violations for which the individual was cited during the last 3 years. The distribution of X is

a) Calculate the variance of this distribution. b) If the cost of insurance depends on the following

function of accidents, g(y) = 400 + (100y -15), what is the standard deviation of the cost of the insurance?

X 0 1 2 3px 0.60 0.25 0.10 0.05

Page 45: Chapter 4. Probability: The Study of Randomness  1.

45

Example: Variance5 individuals who have automobile insurance from a certain company are randomly selected. Let X and Y be two different independent accident profiles in this insurance company:

Var(X) = 0.74

Var(Y) = 0.95 What is the standard deviation of the difference between

the 2 who have insurance using the X distribution and the 3 who have insurance using the Y distribution?

X 0 1 2 3px 0.60 0.25 0.10 0.05Y 0 1 2 3pY 0.40 0.35 0.15 0.10

Page 46: Chapter 4. Probability: The Study of Randomness  1.

46

4.5: General Probability Rules - Goals• Apply the five rules of probability (again).• Apply the generation addition rule.• Be able to calculate conditional probabilities.• Apply the general multiplication rule.• Be able to use tree diagram.• Use Bayes’s rule to find probabilities.• Determine if two events with positive probability

are independent.

Page 47: Chapter 4. Probability: The Study of Randomness  1.

47

Probability RulesRule 1. The probability P(A) of any event A

satisfies 0 ≤ P(A) ≤ 1.Rule 2. If S is the sample space in a probability

model, then P(S) = 1.Rule 3. If A and B are disjoint,

P(A or B) = P(A) + P(B). Rule 4: For any event A, P(AC) = 1 – P(A).Rule 5: If A and B are independent:

P(A and B) = P(A) P(B)

Page 48: Chapter 4. Probability: The Study of Randomness  1.

48

General Addition Rule

P(A or B) = P(A) + P(B) – P(A and B)Select a card at random from a deck of cards.

What is the probability that the card is either an Ace or a Heart?

Page 49: Chapter 4. Probability: The Study of Randomness  1.

49

Example: Venn Diagrams

At a certain University, the probability that a student is a math major is 0.25 and the probability that a student is a computer science major is 0.31. In addition, the probability that a student is a math major and a student science major is 0.15.

a) What is the probability that a student is a math major or a computer science major?

b) What is the probability that a student is a computer science major but is NOT a math major?

Page 50: Chapter 4. Probability: The Study of Randomness  1.

50

Conditional Probability

http://stats.stackexchange.com/questions/423/what-is-your-favorite-data-analysis-cartoon

Page 51: Chapter 4. Probability: The Study of Randomness  1.

51

Conditional Probability: ExampleA news magazine publishes three columns entitled

"Art" (A), "Books" (B) and "Cinema" (C). Reading habits of a randomly selected reader with respect to these columns are

a) What is the probability that a reader reads the Art column given that they also read the Books column?

b) What is the probability that a reader reads the Books column given that they also read the Art column?

Read Regularly

A B C A and B A and C B and C

Probability 0.14 0.23 0.37 0.08 0.09 0.13

Page 52: Chapter 4. Probability: The Study of Randomness  1.

52

Example: General Multiplication Rule

Suppose that 8 good and 2 defective fuses have been mixed up. To find the defective fuses we need to test them one-by-one, at random. Once we test a fuse, we set it aside.

a) What is the probability that we find both of the defective fuses in the first two tests?

b) What is the probability that when testing 3 of the fuses, the first tested fuse is good and the last two tested are defective?

Page 53: Chapter 4. Probability: The Study of Randomness  1.

53

Independence RevisitedGeneral multiplication rule:

P(A and B) = P(A) P(B|A)If A and B are independent:

P(A and B) = P(A) P(B)Therefore, if A and B are independent:

P(B|A) = P(B)

Page 54: Chapter 4. Probability: The Study of Randomness  1.

54

Example: Tree Diagram/Bayes’s RuleA diagnostic test for a certain disease has a 99%

sensitivity and a 95% specificity. Only 1% of the population has the disease in question. If the diagnostic test reports that a person chosen at random from the population tests positive, what is the probability that the person does, in fact, have the disease?

Page 55: Chapter 4. Probability: The Study of Randomness  1.

55

Bayes’s Rule• Suppose that a sample space is decomposed

into k disjoint events A1, A2, … , Ak —none of which has a 0 probability—such that

• Let B be any other event such that P(B) is not 0. Then

Page 56: Chapter 4. Probability: The Study of Randomness  1.

56

Law of Total Probability

B and 3

2

34 5

6

7

1

B and 4 B and 6

B and 7

B