Probability, Random Variables and the Normal Distribution

Business Statistics
Lecture 3: Random Variables and the
Normal Distribution
1
Goals for this Lecture
• A little bit of probability
• Random variables
• The normal distribution
2
Probability vs. Statistics
• Probability: You assume a mechanism that
generates particular outcomes and then
calculate the chance of other outcomes
• E.g., Given a “fair” coin, what is the chance of
flipping four heads and two tails out of six flips?
• Statistics: After seeing some outcomes, you
try to say something about the mechanism
generating the outcomes
• E.g., After flipping four heads and two tails you
ask, “What are the chances this coin is fair?”
• Two sides of the same coin (pun intended!)
• Language of probability common to both
3
Definitions
Venn Diagrams
• Sample space (S)
• Set of all possible
S
outcomes of an experiment
• Event
• Collection of one or more
outcomes
• Probability
• Function assigning a
S
A
number from 0 to 1 to
events, subject to rules
4
Examples:
Sample Spaces and Events
• Roll a fair die: S = {1,2,3,4,5,6}
• Simple events
• Roll is a 1
• Roll is a 6
• Compound event
• Roll is even: {2, 4, 6}
• Roll is less than 4: {1, 2, 3}
• Fair: each simple event is equally likely
• Other sample space examples:
• Flip of one coin: S = {H, T}
• Flip two coins: S = {(H,H), (H,T), (T,H), (T,T)}
5
Set Theory Terminology
Venn Diagrams
• Union: A  B
• outcomes in event A or event B or both
B
A
B
S
• Intersection: A  B
• outcomes in both event A and event B
A
S
c
• Complement: A
• outcomes in S not in event A
A
Ac
S
• Mutually exclusive or disjoint events
A
• events with no outcomes in common
S
B
6
Some Notation
• Pr(A) or P(A) is shorthand for “the probability
that event „A‟ occurs”
• For a coin, we might write Pr(H) to mean the
probability that a head occurs, for example
• If we define N(A) as the number of “A” events
in the sample space, then
Pr(H ) 
N (H )
totalnumber of outcomesin S
1

2
under the assumption that all simple events
are equally likely
7
Probability of the
Union of Disjoint Events
• Disjoint (or mutually exclusive) events: Both
events cannot happen at the same time
A
B
• Either A or B (or “not A or B”) will happen
• Probability of the union of two disjoint events:
Pr(A or B) = Pr(A U B) = Pr(A) + Pr(B)
• Ex: Probability of rolling a 1 or a 2 on a die:
– Pr(roll 1 or 2) = Pr(roll 1) + Pr(roll 2) = 1/6 + 1/6 = 1/3
8
General Rule for Probability of
the Union of Two Events
• Both events can happen at the same time
• Yellow/green striped region
A
B
• In general, probability of the union of two events:
Pr (A and b) = Pr(A U B) = Pr(A) + Pr(B) – Pr(A B)
U
U
• Pr(A
B) is the intersection of A and B
• Basically, the striped area is counted twice in
Pr(A) + Pr(B), so one must be subtracted off
• When events are disjoint Pr(A B) = 0
U
9
Probability An Event
Will Not Happen
• Complementary events: Either one or
the other will happen, but not both
Not A
A
• Either A will happen or “not A” will happen
c
• Pr(not A) = Pr(A ) = 1 - Pr(A)
• Ex: The probability that you do not roll a 3 is
1 minus the probability that you roll a 3
– Pr(not roll 3) = 1 – Pr(roll 3) = 1 – 1/6 = 5/6
10
Probability of the Intersection of
Independent Events
• Independent events:
B
Two observations are
A
independent if knowing
the value of one doesn‟t help you guess the
value of the other
• Rule: Pr(A and B) = Pr(A B) = Pr(A) x Pr(B)
• Example: In two rolls, the probability you roll
a 1 both times
U
• Pr( roll a 1 both times)
= Pr(roll 1 on first roll) x Pr(roll 1 on second roll)
= 1/6 x 1/6 = 1/36
11
Dependence
• Opposite of independence
• Knowing the value of one observation
helps you guess the value of another
• Example: The average price of GM‟s stock
was $59.50 in September. What will the
average price be for October?
• Your best guess uses the September
information, so the average monthly stock
prices are dependent
12
Variables vs. Random Variables
• A variable is simply a notational placeholder
for a measured or observed value
• E.g., let the variable A equal your age
• For me, A=47 (years)
• A random variable is a variable for a random
observation
• E.g., let the random variable X be the age of a
random person in the class
• For a specific person, X has a value
• For a collection of people, X has a distribution,
which gives the frequency of occurrence of ages
in class
13
Random Variables
• From the first class:
Let X be the outcome of a dice roll
• X is a random variable
• X can be equal to 1, 2, 3, 4, 5, or 6
depending on what occurs on the roll of a
dice
• X has a distribution:
•
•
Probability X=x is 1/6, for x=1,2,3,4,5, or 6
Notation: Pr(X=x)=1/6, for x=1,2,3,4,5, or 6
14
Plotting a Probability Distribution
• Let X denote the outcome of a fair die
• i.e., Pr(X=x)=1/6, for x=1,2,3,4,5, or 6
• We can draw the probability function:
Pr (X=x)
2/6
1/6
0
0
1
2
3
x
4
5
6
15
Probability Distributions
• Can be for either discrete or continuous
variables (data)
• Gives the probability of an event or set
of events
• Sum over all possible events equals 1
• Means one of the possible events must
happen
• E.g., Rolled die must give a 1, 2, 3, 4, 5,
or 6
16
Normal Distributions
• Normal Distribution is an important
continuous distribution
• Symmetric, bell-shaped
• For population, described by its
• Mean:
Greek letter “mu”
• Standard deviation:
Greek letter “sigma”
2
• Notation: N( ,
)



• Being non-normal does not mean
abnormal
17
Properties of the Normal Curve
•
•
•
•
Symmetric
Bell shaped
Unimodal
“Thin tails”
• The normal curve is a model relating the
mean and variance to the quantiles
18
Why Focus on the
Normal Distribution?
• Normal distribution describes many
natural phenomenon well
• Central Limit Theorem explains why
• Statistical theorem: Distribution of sums of
random variables tends toward the normal
• The more things that are summed, the
more like the normal
• Result is that averages tend to have a
normal distribution
19
Central Limit Theorem in Action
.99
Highly skewed
process
.95
.90
.95
.90
.75
.75
.50
.50
0
.25
.01
-3
.01
-3
.1
.2
.3
•.75
•.50
Mean
of 10
•.01
.1
.2
.3
.4
.5
.6
.6
.7
3
2
.95
.90
1
.75
2
1
.50
0
-1
-2
-3
.0
.5
.99
•.25
•.10
•.05
.4
3
•.99
•.95
•.90
-1
.10
.05
.0
.0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1.0
1
.25
Mean
of 5
-1
.10
.05
3
.99
2
0
.25
Mean
of 100
-1
.10
.05
-2
.01
-3
.2
.3
Statistics and Parameters
• A statistic is a one-number summary of data
• Statistics can be for samples or populations
• x-bar and s are examples of sample statistics
•  and  are parameters of the normal
distribution
• We often estimate parameters with statistics
• Estimate
• Estimate


with X
with s
21
Parameters vs. Statistics
• Every population
summary…
• Mean ()
• Standard Deviation
()
• Proportion (p)
 Parameters
…has a corresponding
sample summary
• Mean  x 
• Standard deviation
s 
• Proportion  p̂ 
 Statistics
 Sample statistics are good guesses for
population parameters, but they’re not the
same
22
The Empirical Rule
• If the normal curve
fits well then:
• 68% of the data is
0.40
within 1 SD of the
mean
• 95% within 2 SD
• 99% within 3 SD
0.35
0.30
0.25
0.20
68%
0.15
0.10
95%
0.05
99%
0.00
-4
-3
-2
-1
0
Z
1
2
3
23
4
“Standardizing” a
Normal Distribution
• Standardizing means turning an
2
observation from a N( , ) into a
N(0,1) observation
•
2


If X comes from a N( , ) then
Z
X 

has a N(0,1) distribution
• If  and  are estimated, then use
X x
Z
s
24
Finding the Probability
for a Normal Distribution (1)
• See Table A3-2 on page 491 in
Business Statistics
• Enter with a value of “a”
• Read across to the “p” column to get
probability of being between a and –a
• Example: a=1
•
•
Probability is 0.6827 of being between 1 and –1
Empirical rule!
• Note: Can also go in the other direction to
find the a-value corresponding to a
probability
25
Finding the Probability
for a Normal Distribution (2)
• See Table A3-1 on page 492 in
Business Statistics
• Enter with a value of “a”
• Read across to the “p” column to get
probability of being less than a
•
•
Example: a=1: Probability is 0.8413
Example: a=-1: Probability is 0.1587
• So, Pr(-1<z<1) = Pr(z < 1) – Pr(z < -1)
=0.8413 – 0.1587 = 0.6826
•
Empirical rule again!
26
Finding the Probability
for a Normal Distribution (3)
• In Excel, use NORMSDIST function
• “=NORMSDIST(a)” = Pr(Z<a)
• Just like Table A3-1
• Can also use NORMDIST function
• Gives probability for any normal distribution
• Form: =NORMDIST(a,,,1)
• So, NORMDIST(a,0,1,1) = NORMSDIST(a)
27
Exercises in finding the Probability
for a Normal Distribution
• For a standard normal distribution:
• What is the probability of being outside of
the interval (3, -3)?
• What is the probability of getting an
observation less than –2?
2
• For a N(1,3 ) distribution:
• What is the probability of being within one
standard deviation of the mean?
• What is the probability of getting an
observation greater than 7?
28
Solutions…
29
Using Normal Probabilities
to Test Assertions
• You are production manager of a widget
manufacturing facility
• Defective widget: quality characteristic < 7
• Line supervisor says not to worry:
• Distribution of quality characteristic is N(16,9)
• Should you worry or not?
• You‟re a careful production manager
• Visit the line and pick a random widget
• Widget‟s quality characteristic measures 5
• Do you believe the supervisor‟s distribution
assertion?
30
The Calculations…
31
Testing Normality
• Normal Quantile Plot, or “Q-Q” Plot
• X-axis: observed data
• Y-axis: expected data if normal model were true
• Close to straight line means close to normal
• JMP: After Analyze > Distribution > red triangle >
Normal Quantile Pl
800
.01
.05.10
.25
.50
.75
.90.95
.99
RelChange
700
GMAT Score
.01
0.07
600
500
400
.05.10
.25
.50
.75
.90.95
.99
0.05
0.03
0.01
-0.01
-0.03
-0.05
-0.07
-2
-1
0
Normal Quantile Plot
GMAT Case
1
2
3
50 100 150 200
Count Axis
-2
-1
0
1
2
3
Normal Quantile Plot
GM Stock Case
32
Evaluating Normality
.99
Highly skewed
process
.95
.90
.95
.90
.75
.75
.50
.50
0
.25
.01
-3
.01
-3
.1
.2
.3
•.75
•.50
Mean
of 10
•.01
.1
.2
.3
.4
.5
.6
.6
.7
3
2
.95
.90
1
.75
2
1
.50
0
-1
-2
-3
.0
.5
.99
•.25
•.10
•.05
.4
3
•.99
•.95
•.90
-1
.10
.05
.0
.0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1.0
1
.25
Mean
of 5
-1
.10
.05
3
.99
2
0
.25
Mean
of 100
-1
.10
.05
-2
.01
-3
.2
.3
In the Readings…
• …don‟t worry too much about:
• Sampling with and without replacement
• Permutations and combinations
• Uniform, t, chi-square, and F distributions
• If we had more time, we‟d cover these
topics
34
What we have learned so far…
•
•
•
•
Types of data and types of variation
Descriptive statistics
Statistical plots and graphs
Random variables and a little probability
• “And,” “Or,” “Not” rules
• The normal distribution
• Standardizing
• Calculating probabilities
35