Sullivan 2nd ed Chapter 6

Download Report

Transcript Sullivan 2nd ed Chapter 6

Chapter 6
Section 1
Discrete
Random Variables
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 1 of 34
Chapter 6 – Section 1
● Learning objectives
1

2

3

4

5

6

Distinguish between discrete and continuous random
variables
Identify discrete probability distributions
Construct probability histograms
Compute and interpret the mean of a discrete random
variable
Interpret the mean of a discrete random variable as
an expected value
Compute the variance and standard deviation of a
discrete random variable
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 2 of 34
Chapter 6 – Section 1
● Learning objectives
1

2

3

4

5

6

Distinguish between discrete and continuous random
variables
Identify discrete probability distributions
Construct probability histograms
Compute and interpret the mean of a discrete random
variable
Interpret the mean of a discrete random variable as
an expected value
Compute the variance and standard deviation of a
discrete random variable
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 3 of 34
Chapter 6 – Section 1
● 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 (and Y and Z …)
 Values are usually written with lower case letters,
typically using x (and y and z ...)
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 4 of 34
Chapter 6 – Section 1
● Examples
● Tossing four coins and counting the number of
heads
 The number could be 0, 1, 2, 3, or 4
 The number could change when we toss another four
coins
● Measuring the heights of students
 The heights could change from student to student
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 5 of 34
Chapter 6 – Section 1
● A discrete random variable is a random variable
that has either a finite or a countable number of
values
 A finite number of values such as {0, 1, 2, 3, and 4}
 A countable number of values such as {1, 2, 3, …}
● Discrete random variables are designed to
model discrete variables (see section 1.2)
● Discrete random variables are often “counts of
…”
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 6 of 34
Chapter 6 – Section 1
● An example of a discrete random variable
● The number of heads in tossing 3 coins (a finite
number of possible values)
 There are four possible values – 0 heads, 1 head, 2
heads, and 3 heads
 A finite number of possible values – a discrete
random variable
 This fits our general concept that discrete random
variables are often “counts of …”
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 7 of 34
Chapter 6 – Section 1
● Other examples of discrete random variables
● The possible rolls when rolling a pair of dice
 A finite number of possible pairs, ranging from (1,1) to
(6,6)
● 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
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 8 of 34
Chapter 6 – Section 1
● 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 (see section 1.1)
● Continuous random variables are often
“measurements of …”
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 9 of 34
Chapter 6 – Section 1
● An example of a continuous random variable
● The possible temperature in Chicago at noon
tomorrow, measured in degrees Fahrenheit
 The possible values (assuming that we can measure
temperature to great accuracy) are in an interval
 The interval may be something like (–20,110)
 This fits our general concept that continuous random
variables are often “measurements of …”
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 10 of 34
Chapter 6 – Section 1
● Other examples of continuous random variables
● The height of a college student
 A value in an interval between 3 and 8 feet
● The length of a country and western song
 A value in an interval between 1 and 15 minutes
● The number of bytes of storage used on a 80
GB (80 billion bytes) hard drive
 Although this is discrete, it is more reasonable to
model it as a continuous random variable between 0
and 80 GB
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 11 of 34
Chapter 6 – Section 1
● 1. A study was conducted to determine whether listening to classical music
would increase one’s metabolism. To help determine the effect of classical
music on the resting metabolic rate, the researchers measured several
random variables on each of the subjects. For each of the variables, state
whether it is discrete or continuous. Incidentally, the researchers found no
significant effect of classical music on the resting metabolic rate. (Source:
Carlsson E, Helgegren H and Slinde F (2005) Resting energy expenditure is
not influenced by classical music. Journal of Negative Results in
BioMedicine.) A. Discrete
B. Continuous
 a. Age at last birthday
 b. Body mass index (body mass divided by the square of the height)
 c. Resting energy expenditure (energy required to maintain basic bodily functions
while resting for one-half hour)
 d. Environmental temperature
 e. Height (rounded to the nearest centimeter)
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 12 of 34
Chapter 6 – Section 1
● Learning objectives
1

2

3

4

5

6

Distinguish between discrete and continuous random
variables
Identify discrete probability distributions
Construct probability histograms
Compute and interpret the mean of a discrete random
variable
Interpret the mean of a discrete random variable as
an expected value
Compute the variance and standard deviation of a
discrete random variable
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 13 of 34
Chapter 6 – Section 1
● The probability distribution of a discrete random
variable X relates the values of X with 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
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 14 of 34
Chapter 6 – Section 1
● 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
● Examples
 In tossing one coin, if X is the number of heads, then
P(0) = 0.5 and P(1) = 0.5
 In rolling one die, if X is the number rolled, then
P(1) = 1/6
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 15 of 34
Chapter 6 – Section 1
● 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
● In the second rule, the Σ sign means to add up
the P(x)’s for all the possible x’s
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 16 of 34
Chapter 6 – Section 1
● An example of a discrete probability distribution
x
1
2
P(x)
.2
.6
5
6
.1
.1
● All of the P(x) values are positive and they add
up to 1
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 17 of 34
Chapter 6 – Section 1
● An example that is not a probability distribution
x
1
2
P(x)
.2
.6
5
6
-.3
.1
● Two things are wrong
 P(5) is negative
 The P(x)’s do not add up to 1
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 18 of 34
Chapter 6 – Section 1
● Learning objectives
1

2

3

4

5

6

Distinguish between discrete and continuous random
variables
Identify discrete probability distributions
Construct probability histograms
Compute and interpret the mean of a discrete random
variable
Interpret the mean of a discrete random variable as
an expected value
Compute the variance and standard deviation of a
discrete random variable
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 19 of 34
Chapter 6 – Section 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)
● A probability histogram is very similar to a
relative frequency histogram
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 20 of 34
Chapter 6 – Section 1
● An example of a probability histogram
● The histogram is drawn so that the height of the
bar is the probability of that value
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 21 of 34
Chapter 6 – Section 1
● Learning objectives
1

2

3

4

5

6

Distinguish between discrete and continuous random
variables
Identify discrete probability distributions
Construct probability histograms
Compute and interpret the mean of a discrete random
variable
Interpret the mean of a discrete random variable as
an expected value
Compute the variance and standard deviation of a
discrete random variable
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 22 of 34
Chapter 6 – Section 1
● 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 a
larger role in calculating the mean
 The mean is the weighted average of the values,
weighted by the probabilities
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 23 of 34
Chapter 6 – Section 1
● The mean of a discrete random variable is
μX = Σ [ x • P(x) ]
● In this formula
 x are the possible values of X
 P(x) is the probability that x occurs
 Σ means to add up these terms for all the possible
values x
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 24 of 34
Chapter 6 – Section 1
● Example of a calculation for the mean
Multiply
x
P(x)
x • P(x)
1
0.2
0.2
2
0.6
1.2
Multiply again
5
0.1
0.5
Multiply again
6
0.1
0.6
Multiply again
● Add: 0.2 + 1.2 + 0.5 + 0.6 = 2.5
● The mean of this discrete random variable is 2.5
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 25 of 34
Chapter 6 – Section 1
● The calculation for this problem written out
μX = Σ [ x • P(x) ]
= [1• 0.2] + [2• 0.6] + [5• 0.1] + [6• 0.1]
= 0.2 + 1.2 + 0.5 + 0.6
= 2.5
● The mean of this discrete random variable is 2.5
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 26 of 34
Chapter 6 – Section 1
● 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
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 27 of 34
Chapter 6 – Section 1
● Learning objectives
1

2

3

4

5

6

Distinguish between discrete and continuous random
variables
Identify discrete probability distributions
Construct probability histograms
Compute and interpret the mean of a discrete random
variable
Interpret the mean of a discrete random variable as
an expected value
Compute the variance and standard deviation of a
discrete random variable
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 28 of 34
Chapter 6 – Section 1
● 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
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 29 of 34
Chapter 6 – Section 1
● Learning objectives
1

2

3

4

5

6

Distinguish between discrete and continuous random
variables
Identify discrete probability distributions
Construct probability histograms
Compute and interpret the mean of a discrete random
variable
Interpret the mean of a discrete random variable as
an expected value
Compute the variance and standard deviation of a
discrete random variable
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 30 of 34
Chapter 6 – Section 1
● The variance of a discrete random variable is
computed similarly as for the mean
● The mean is the weighted sum of the values
μX = Σ [ x • P(x) ]
● The variance is the weighted sum of the squared
differences from the mean
σX2 = Σ [ (x – μX)2 • P(x) ]
● The standard deviation, as we’ve seen before, is
the square root of the variance … σX = √ σX2
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 31 of 34
Chapter 6 – Section 1
● The variance formula
σX2 = Σ [ (x – μX)2 • P(x) ]
can involve calculations with many decimals or
fractions
● An equivalent formula is
σX2 = [ Σ x2 • P(x) ] – μX2
● This formula is often easier to compute
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 32 of 34
Chapter 6 – Section 1
● For variables and samples (section 3.2), we had
the concept of a population variance (for the
entire population) and a sample variance (for a
sample from that population)
● These probability distributions model the
complete population
 These are population variance formulas
 There is no analogy for sample variance here
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 33 of 34
Chapter 6 – Section 1
● The variance can be calculated by hand, but the
calculation is very tedious
● Whenever possible, use technology (calculators,
software programs, etc.) to calculate variances
and standard deviations
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 34 of 34
Summary: Chapter 6 – Section 1
● Discrete random variables are measures of
outcomes that have discrete values
● Discrete random variables are specified by their
probability distributions
● The mean of a discrete random variable can be
interpreted as the long term average of repeated
independent experiments
● The variance of a discrete random variable
measures its dispersion from its mean
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 35 of 34
Example
● Daniel Reisman, of Niverville, New York, submitted the following
question to Marilyn vos Savant's December 27, 1998, Parade
Magazine column, “Ask Marilyn:”
 At a monthly ‘casino night,’ there is a game called 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.
 It appears that the odds of winning are 1 in 6 for each of the three dice,
for a total of 3 out of 6 - or 50%. Adding the possibility of having more
than one die come up with your number, the odds would seem to be in
the gambler's favor. What are the odds of winning this game? I can't
believe that a casino game would favor the gambler.
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 36 of 34
Example
● Daniel computed the probabilities incorrectly. 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. The
table below summarizes the probabilities of earning a
profit of x dollars from a $1 bet. Use this table to answer
the following questions.
Number of dice matching the chosen number
Profit, x
Probability, P(X=x)




0 dice
1 dice
2 dice
3 dice
$–1
$1
$2
$3
125 / 216
75 / 216
15 / 216
1 / 216
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 37 of 34
Example
●
●
●
●
●
●
●
●
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.
d. Based on your answer to the previous question, would you
recommend playing this game?
e. Compute the variance of the random variable X.
f. Compute the standard deviation of the random variable X.
g. What is the probability that a player will match all three of the
dice?
h. What is the probability that a player will match at least one of the
dice?
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 38 of 34
Example - Answers
●
a. (The probabilities are all between 0 and 1, and they sum to 1)
●
b. see Minitab
●
c. ($-0.08. This means that a gambler’s losses will be approximately $0.08 per game
in the long run. If you play this game for a very long time, your mean winnings will be
close to –0.0787 per game. So, in the long run, you are better off to throw away 7
cents than to play this game.)
●
d. (No)
●
e. (1.239)
●
f. (1.113)
●
g. (1/216)
●
h. (91/216)
Sullivan – Fundamentals of Statistics – 2nd Edition – Chapter 6 Section 1 – Slide 39 of 34