Nothing Special   »   [go: up one dir, main page]

CH 4 & CH 5 (Notes)

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 25

MA150

STATIS
TICS
NOTES
CHAPT
ER 4-
CHAPT
ER 5

Chapter 4: Probability Concepts


CH4.1: Probability Basics

1
Four ways to think about probability
1. Empirical Probability
To estimate the probability of a tossing a coin and getting a head, toss the coin
100 times, count the number of heads, say 42. The empirical probability of a
head is 42/100.
In general for an event E
frequency of E
P( E) ≈
number of trials of the experiment
As the number of trials becomes large, the empirical probability becomes very
close to the classical probability.

2. Classical Probability
Consider a “fair” coin, where the probability of heads is assumed to be equal to
the probability of tails. The classical probability of flipping a coin and getting a
head is

Number of ways of getting a head


P( H ead) =
Total number of possible outcomes
3. Simulated Probability
Sometimes probabilities are difficult to calculate, but the experiment can be
simulated on a computer. If we simulate the experiment multiple times, then
this is similar to the situation for the empirical method
frequency of E
P( E) ≈
number of runs of the simulation

4. Subjective Probability
A subjective probability is a person’s estimate of the chance of an event
occurring. This is based on personal judgment. Subjective probabilities should
be between 0 and 1, but may not obey all the laws of probability
For example, 90% of the people consider themselves better than average drivers

Example: Classical Probability


Consider rolling 2 fair dice. What does fair mean?

2
What is the probability of rolling two dice and the sum is 4?

Example: Simulated Probability


Two computer simulations of tossing a balanced coin
100 times

Probability for equally likely outcomes:


If an experiment has N possible outcomes, all equally likely, then
1
Probability of an outcome = N
Consider an event that can occur f possible ways
f
Probability of the event = N

number of ways an event can occur


=
Probability of an event total number of possible outcomes

CH 4.2 Events

3
Probability Rules (using classical methods)

An Experiment is an action that has N possible outcomes.


1
If the outcomes are equally likely then Probability of each outcome = N

The sample space is the set of all possible outcomes.


An event is some specified result that may or may not occur. It is a subset of the
sample space.

Let E be an event, then P(E) represents the probability that event E occurs. It is read
“the probability of E.”

Example: Consider the experiment that consists of rolling a die. The possible
outcomes are: 1, 2, 3, 4, 5, 6
N=6

Event 1: A 3 shows
P(event 1) = P(outcome = 3) = 1/6

Event 2: An even number shows


P(event 2) = P(2, 4, or 6) = 3/6 = ½

Event 3: Number > 4 shows


P(5, 6) = 2/6 = 1/3

Probability for equally likely outcomes:


If an experiment has N possible outcomes, all equally likely, then
1
Probability of an outcome = N
Consider an event that can occur f possible ways
f
Probability of the event = N

number of ways an event can occur


=
Probability of an event total number of possible outcomes

4
Consider rolling 2 fair dice. What does fair mean?

There are 36 possible outcomes, N=36


Find each probability.
a) P(sum = 10)
b) P(double)
c) P(sum = 7)
Construct a probability distribution of the sum of 2 fair dice.

Which sum is most likely?

Which sum is least likely?

Would you take this bet?


Roll 2 dice, I’ll bet you $10.00 that the sum is 7 or greater.

Basic Properties of Probabilities


 Property 1: 0≤p≤1
 Property 2: If an event E can not occur the P(E) = 0
E is called the impossible event
[Example: P(sum of 2 dice is 20)=0]
 Property 3: If E is an event that must occur, P(E) =1
E is a certain event
[Example: P(sum of 2 dice > 0) = 1]

5
Example: A resident is chosen at random. Find the probability that the resident is a
sophomore.

 Experiment: randomly choosing a dorm resident.


 Sample Space: the set of all dorm residents.
 Event: the set of all sophomores who reside in dorm.

Class level Number of dorm residents


Freshmen 128
Sophomore 112
Junior 96
Senior 48
TOTAL 384

Exercise: Consider a deck of 52 cards. Find the probability of each event.

P(card selected is the ace of hearts) =

P(King) =

P(heart) =

P(face card) =

Venn Diagrams

6
Define not E to be “the event E does not occur”
Define A & B to be “both A and B occur”.
Define A or B to be the event that “either A or B or both occur”.

Mutually Exclusive or Disjoint: Two or more events are mutually exclusive events if
at most one of them can occur when the experiment is performed, that is no two of
them have outcomes in common.

(a) Two mutually exclusive events;


(b) two non–mutually exclusive events

7
(a) Three mutually exclusive events;
(b) three non–mutually exclusive events;
(c) three non–mutually exclusive events

Example: Consider rolling 2 fair dice.


Consider 2 events:
A: The sum is equal to 4
B: The sum is equal to 7.

Fill the table and use the classical method to calculate the following probabilities.
Event Outcomes Probability
A
B
A&B
A or B

Draw a Venn diagram, identify the events A, B, A or B, A and B.

Example: Consider the experiment of rolling 2 dice.

8
Let:
A = The sum is equal to 4
B = a double shows

Fill the table and use the classical method to calculate the following probabilities.
Event Outcomes Probability
A
B
A&B
A or B

Draw a Venn diagram of Event A and Event B.

CH 4.3 Some Rules of Probability


The Special Addition Rule
For 2 events:
If A and B are mutually exclusive
P(A or B ) = P(A) + P(B)

For 3 events:
If A and B and C are mutually exclusive
P(A or B or C ) = P(A) + P(B) + P(C)

For more than 3 events:


In general if events A, B, C, … are mutually exclusive
P(A or B or C or ….) = P(A) + P(B) + P(C) + …

Example: Consider rolling 2 fair dice.

9
Consider 2 events:
A: The sum is equal to 4
B: The sum is equal to 7.

Calculate P(A or B) for using the Special Addition Rule and compare it to the answer
you got using the classical rule.
P(A or B ) = P(A) + P(B)

The General Addition Rule

If A and B are any two event, then


P(A or B) = P(A) + P(B) – P(A&B)

For any two events, the probability that one or the other or both occurs equals the sum
of the individual probabilities less the probability that both occur.

Example: Consider the experiment of rolling 2 dice.


Let:
A = The sum is equal to 4
B = a double shows

Fill the table and use the classical method to calculate the following probabilities.
Event Outcomes Probability
A
B
A&B
A or B

Calculate P(A or B) for using the General Addition Rule and compare it to the answer
you got using the classical rule.
P(A or B ) = P(A) + P(B) – P(A&B)

10
Complement Events
Let Event A be an event, then the Event “not A” is the event that is made up of the
outcomes in the sample space that are not in the Event A.
Example: Consider the experiment rolling 1 die. If Event A = a number bigger than 2
shows, then
Event A ={3, 4, 5, 6} P(A) = 4/6

Event not A = {1, 2} P(not A) = 2/6

Complementation Rule
For an event A, P(not A) = 1 – P(A).

The probability that an event occurs is equal to 1 minus the probability that the event
does not occur.

Section 4.4 Contingency Tables; Joint and Marginal


Probabilities
Contingency Table: The following is a table displaying the number of students of
each academic year and gender in the cafeteria on a given morning.

Male Female total


Freshman 7 11 18
Sophomore 8 5 13
Junior 5 7 12
Senior 3 2 5
Other 0 1 1
total 23 26 49

If a student is randomly chosen, what is the probability that:


1. the student is a junior?

2. the student is male?

11
3. the student is female? Use the complementation rule.

4. the student is a female junior?

5. the student is a female or a junior?

Looking back at the contingency table:


Male Female total
Freshman 0.14 0.22 0.37
Sophomor
e 0.16 0.10 0.27
Junior 0.10 0.14 0.24
Senior 0.06 0.04 0.10
Other 0.00 0.02 0.02
total 0.47 0.53 1.00

Joint Probabilities: Interior Probabilities

Marginal Probabilities: Row and Column Sums

12
CH 4.5: Conditional Probability

Conditional Probability
The probability that event B occurs given that event A occurs is called a conditional
probability. It is denoted P(B | A), which is read “the probability of B given A.” We
call A the given event.

13
Example: We choose a person at random out of this group.
Male Female Total
Right Handed 38 42 80
Left handed 12 8 20
Total 50 50 100

If M = “male” and LH = “left handed”,


 Compute P(LH), Probability of left-handed.

P(LH) = 20/100

 Find P(LH|M). the probability of left handed, given male

P(LH|M) = 12/50

 Find the probability of male, given left handed

P(M|LH) = 12/20

The following table shows the joint probability distribution of marital status and
gender, we choose a person at random out of this group.

What is the probability that:


 the person is a married male ?

 the person is divorced?

 The person is a single male or divorced female

14
Chapter 5: Discrete Random Variables
CH5.1: Discrete Random Variables & Probability Distributions

A random variable is a numeric measure of the outcome of a probability


experiment

 Random variables reflect measurements that can change as the experiment is


repeated
 Random variables are denoted with capital letters, typically using X , Y, or Z, …
 Observed values are usually written with lower case letters, typically using x, y,
or z, ...

Examples:

 Tossing four coins and counting the number of heads


Let X = the number of heads
Then x = the specific value that X could take on, 0, 1, 2, 3, or 4.

 Measuring the heights of students


Let X = the height of the student
Then x = the specific value it could take on

A discrete random variable is a random variable whose possible values can be


listed (has either a finite or a countable number of values)

The values are:


 A finite number of values such as {0, 1, 2, 3, 4}
 A countable number of values such as {1, 2, 3, …}
Discrete random variables are designed to model discrete variables and are often
“counts of …”

Examples:

 The number of pages in statistics textbooks


 A countable number of possible values
 The number of visitors to the White House in a day
 A countable number of possible values

15
A continuous random variable is a random variable that has an infinite, and
more than countable, number of values

The values are any number in an interval


Continuous random variables are designed to model continuous variables (CH 2.1)
and are often “measurements of …”

Examples:

 The possible temperature in Chicago at noon tomorrow, measured in degrees


Fahrenheit
o The possible values (assuming that we can measure temperature to great
accuracy) are in an interval
o The interval may be something like (–20,110)
o This fits our general concept that continuous random variables are often
“measurements of …”

 The length of a country and western song


o A value in an interval between 1 and 15 minutes

The probability distribution of a discrete random variable (X) relates the values of
X to their corresponding probabilities

A distribution could be:

 In the form of a table


 In the form of a graph
 In the form of a mathematical formula

If X is a discrete random variable and x is a possible value for X, then we write P(x) as
the probability that X is equal to x

16
Example: In tossing one coin, if X is the number of heads, then

P(0) = 0.5 Outcome X P(x)


and No head 0 0.5
P(1) = 0.5 1 head 1 0.5

Example: In rolling one fair die, if X is the number rolled, then

P(1) = P(2) = P(3) = P(4) = P(5) = P(6) = 1/6

X P(x)
1 1/6
2 1/6
3 1/6
4 1/6
5 1/6
6 1/6

Properties of P(x)
Since P(x) form a probability distribution, they must satisfy the rules of probability

 0 ≤ P(x) ≤ 1
 Σ P(x) = 1

Example: The following table represents a discrete probability distribution.

x P(x)
1 .2
2 .6
5 .1
6 .1

 All of the P(x) values are positive


 The P(x) values add up to 1

17
Example: Does the following table represent a probability distribution? Why?

x P(x)
1 .2
2 .6
5 -.3
6 .1

A probability histogram is a histogram where


 The horizontal axis corresponds to the possible values of X (i.e. the x’s)
 The vertical axis corresponds to the probabilities for those values (i.e. the
P(x)’s)
 The height of the bar is the probability of that value

A probability histogram is very similar to a relative frequency histogram

Example of a probability histogram

18
Exercise: Construct the probability histogram using the following probability
distribution table.

X P(x)
1 .2
2 .6
5 .1
6 .1

19
CH 5.2: The Mean and Standard Deviation of a Discrete
Random Variable

The mean of a probability distribution can be thought of in this way:


 There are various possible values of a discrete random variable
 The values that have the higher probabilities are the ones that occur more often
 The values that occur more often should have more weight in calculating the
mean
 The mean is the weighted average of the values, weighted by the probabilities

The mean of a discrete random variable is


μ = Σ [ x • P(x) ]
where each x is a possible value of X
and P(x) is the probability that x occurs

Example of a calculation for the mean

x P(x) xP(x)
1 0.2 0.2
2 0.6 1.2
5 0.1 0.5
6 0.1 0.6

Add: 0.2 + 1.2 + 0.5 + 0.6 = 2.5


The mean of this discrete random variable is 2.5

The mean can also be thought of this way (as in the Law of Large Numbers)
 If we repeat the experiment many times
 If we record the result each time
 If we calculate the mean of the results (this is just a mean of a group of
numbers)
 Then this mean of the results gets closer and closer to the mean of the random
variable

20
The expected value of a random variable is another term for its mean.

The term “expected value” illustrates the long term nature of the experiments. As we
perform more and more experiments, the mean of the results of those experiments gets
closer to the “expected value” of the random variable

Example: Life insurance


A life insurance company sells a $250,000 one year term life insurance policy to a 20-
year old male for $350. The probability that the male survives is 0.998611. Compute
and interpret the expected value of this policy to the insurance company.

x P(x) xP(x)
350 .998611 +349.51385
350 -250,000= -249,650 .001389 -346.76385
sum +2.75

The expected value of the policy to the insurance company is $2.75. The
interpretation is that if the insurance company sold a large number of these
policies, on average, they could expect to make $2.75 on each policy.

21
A More Fun Expected Value Problem
Chuck-a-Luck: Three dice are rolled in a wire cage. You place a bet on any number
from 1 to 6. If any one of the three dice comes up with your number, you win the
amount of your bet. (You also get your original stake back.) If more than one die
comes up with your number, you win the amount of your bet for each match. For
example, if you had a $1 bet on number 5, and each of the dice came up with 5, you
would win $3.
There are four possible outcomes. (The selected number can match 0, 1, 2, or 3 of the
dice.) The random variable X represents the profit from a $1 bet in Chuck-A-Luck.

Number of dice Profit, Probability,


matching the chosen x P(X=x)
number
0 dice $–1 125 / 216
1 dice $1 75 / 216
2 dice $2 15 / 216
3 dice $3 1 / 216

a. Verify that this is a discrete probability distribution.

b. Draw a probability histogram.

c. Compute and interpret the mean of the random variable X.

Number of dice matching Profit, x Probability, P(X=x) xP(X=x)


the chosen number
0 dice $–1 125 / 216 = 0.579
1 dice $1 75 / 216 = 0.3 47
2 dice $2 15 / 216 = 0.069
3 dice $3 1 / 216 =0.005

22
d. Based on your answer to the previous question, would you recommend playing this
game?

e. What is the probability that a player will match all three of the dice?

f. What is the probability that a player will match at least one of the dice?

Example: You pay $1.00 to choose a card.


If you get 2 – 9: you lose your $1.00
If you get 10: You receive your $1.00 back
If you get face card: You get your $1.00 back and an additional $1.00
If you get an Ace: You get $1.00 back and an addition $5.00

Find the Expected Value to Player

Outcome X: Profit P(x) xP(x)


2-9 -$1.00 32/52 = 8/13 -8/13
10 $0.00 4/52 = 1/13 0
Face Card $1.00 12/52 = 3/13 3/13
Ace $4.00 4/52 = 1/13 4/13
Sum -1/13=$-0.08

23
The variance of a discrete random variable is computed similarly as for the mean
 The mean is the weighted sum of the values
μ = Σ [ x • P(X=x) ]
 The variance is the weighted sum of the squared differences from the mean
2 2
σ2 = Σ [ (x – μ)2 • P(X=x) ] or σ2 =∑ x P( X =x)−μ

σ 2 =∑ [(x−μ )2⋅P( x)]


¿ ∑ ( x 2 −2xμ+μ 2 )P( x)
¿ ∑ x 2 P ( x)−2 μ ∑ xP( x)+μ2 ∑ P( x)
¿ ∑ x 2 P ( x)−2 μμ+μ2
¿ ∑ x 2 P ( x)−μ2 Mathematical Proof is optional

The standard deviation, as we’ve seen before, is the square root of the variance
2
σX = =√ σ

Example: Find the standard deviation for the following distribution:

x P(x) xP(x) x2P(x)


1 0.2 0.2 0.2
2 0.6 1.2 2.4
5 0.1 0.5 2.5
6 0.1 0.6 3.6
μX=2.5 ∑ x 2 P( x) =
8.7

2 2
σX2 =∑ x P( x)−μ
= 8.7 – (2.5)2
= 8.7 – 6.25= 2.45
σX =1.57
And a more fun Standard Deviation Example

24
Find the Standard Deviation for the Chuck-a-Luck game.

Number of dice matching Profit Probability


the chosen number x P(X=x) xP(X=x) x2P(X=x)
0 dice $–1 125 / 216 = 0.579
1 dice $1 75 / 216 = 0.3 47
2 dice $2 15 / 216 = 0.069
3 dice $3 1 / 216 =0.005

2 2
σX2 =∑ x P( x)−μ

25

You might also like