Upload
cornelia-carson
View
247
Download
6
Embed Size (px)
Citation preview
Discrete Random Discrete Random VariablesVariables
© Christine Crisp
““Teach A Level Teach A Level Maths”Maths”
Statistics 1Statistics 1
Discrete Random Variables
"Certain images and/or photos on this presentation are the copyrighted property of JupiterImages and are being used with permission under license. These images and/or photos may not be copied or downloaded without permission from JupiterImages"
Statistics 1
AQA
EDEXCEL
OCR
Discrete Random Variables
Suppose we roll an ordinary 6-sided die sixty times and record the number of ones, twos, etc.We might get Number on
die1 2 3 4 5 6
Frequency 12 9 11 10 7 11If I asked you what you might expect to happen if we went on rolling the die you might say that you would expect roughly the same number of ones, twos, etc.
In saying this, you would be using a perfectly reasonable model.Models in Statistics describe situations
and are used to make predictions.
Discrete Random Variables
We could write the model out as a table:
6
1
6
16
1
6
1
6
1
6
1
x gives the value of the number shown on the die.
P (X = )xP
1 2 3 4 5 6x
It is a variable which can be any value from 1 to 6.We let X be a description of the
variable, so:“ X is the number shown on the face of the die”
If x = 1, for example, we get P(X = 1) which means the probability that the number shown on the die is 1.
We label the 2nd row .P (X = )x
Discrete Random Variables
P(X = )x
The sum from 1 to 6 of the probabilities of all the values of X, ( x = 1, 2, 3, 4, 5, 6 )
So, we have
6
1
6
16
1
6
1
6
1
6
11 2 3 4 5 6x
6
1x
This table shows the probability distribution of X.
is the Greek capital letter S and stands for Sum
So we can write
If we add up ( sum ) the probabilities we get
1
equals 1
1)( xX P
Discrete Random Variables
A variable where the sum of the probabilities of all its possible values is equal to 1 is called a random variable ( r.v. ).
So, in our example, X is the random variable “ the number shown on the face of the die”
1)( xXP
We can usually see what values the random variable can have, so we don’t need to show them on the summation sign.So, we often writeX is an example of a discrete random variable. It takes certain values only.In the example these values were the integers from 1 to 6. ( In exercises the numbers are often integers but they don’t have to be. )
Discrete Random VariablesSUMMARY• A statistical model uses probabilities to
describe a situation and to make predictions.
• A probability distribution gives the probabilities for a random variable.
• If X is a discrete random variable, then
1)( xXP
• A variable where the sum of the probabilities of all its possible values is equal to 1 is called a random variable (r.v.). If X takes only certain values in an interval, X is a discrete random variable.
X describes the r.v.x gives the values of the r.v.
N.B.
Discrete Random Variables
1)( xXPWe want to show that , so we
need to find the probabilities of getting 0, 1
or 2 sixes.
6,6,6,6,6,6,6,6 ////
Using for “not a 6 ” we can write the possibilities as
/6
e.g. 1 Let X be the variable “ the number of sixes showing when 2 dice are rolled”. Show that X is a random variable and write its probability distribution in a table.Solution:
We can have 0 sixes, 1 six or 2 sixes:
Then, )0(XP )6,6( //P 6
5
6
5
)1(XP )6,6()6,6( // PP 6
5
6
1
6
1
6
5
36
10
)2(XP )6,6(P 6
1
6
1
36
1
36
25
Tip: It will be easier to add the fractions if we don’t cancel
Discrete Random Variables
The probability table is
P 36
25
36
1036
10 1 2x
(X = )x
36
1
36
10
36
251
36
36
,36
25)0( XP ,
36
10)1( XP
36
1)2( XP
1)( xXPSince , X is a random variable.
So, )( xXP
5
18
Discrete Random Variables
The probability table is
P 36
25
18
5
36
10 1 2x
(X = )x
36
1
36
10
36
251
36
36
,36
25)0( XP ,
36
10)1( XP
36
1)2( XP
1)( xXPSince , X is a random variable.
So, )( xXP
This is an example of a discrete random variable because the variable takes only some values in an interval rather than every value.
Discrete Random Variables
But, . . . can be replaced by , . . .
the probabilities of getting 1, 2, . . .
,1
f
f1p
f
f22p1st x-value 1st
frequency
f
xfx
The Mean of a Discrete Random VariableWe can find the mean of a discrete random
variable in a similar way to that used for data. Suppose we take our first example of rolling a die.Number on
die1 2 3 4 5 6
Frequency 12 9 11 10 7 11
The mean is given by
f
fxfx ...2211
So, the mean
...2211 pxpx px
Discrete Random Variables
When dealing with a model, we use the letter for the mean (the greek letter m).
pxWe write
)( xXxP
or, more often, replacing p by , )( xXP
Notation for the Mean of a Discrete Random Variable
Instead of , we can also write E(X).This notation comes from the idea of the mean being the Expected value of the r.v. X.
pronounced “mew”
Discrete Random Variables
When dealing with a model, we use the letter for the mean (the greek letter m).
We write
)( xXxP
or, more often, replacing p by , )( xXP
Instead of , we can also write E(X).
( Think of this as being what we expect to get on average ).
pronounced “mew”
This notation comes from the idea of the mean being the Expected value of the r.v. X.
px
Notation for the Mean of a Discrete Random Variable
Discrete Random Variables
e.g. 1. A random variable X has the probability distribution
P 4
1
2
1
1 5 10x
(X = )x p
Find (a) the value of p and (b) the mean of X.
Solution:
(a) Since X is a discrete r.v., 1)( xXP
121
41 p
41p
(b) mean, )( xXxP 411
41 1051 2 4
21
Tip: Always check that your value of the mean lies within the range of the given values of x. Here, or 5·25, does lie between 1 and 10.
421
Discrete Random Variables
The probabilities in a probability distribution can sometimes be given by a formula.
3,2,16
)( xx
xXP for
e.g. 1. Write out a probability distribution table for the r.v. X where
The formula is called a probability density function ( p.d.f. ).
Solution:
6
1
6
2P
1 2 3x
(X = )x 6
31
3 2
1
Discrete Random Variables
The probabilities in a probability distribution can sometimes be given by a formula.
3,2,16
)( xx
xXP for
e.g. 1. Write out a probability distribution table for the r.v. X where
The formula is called a probability density function ( p.d.f. ).
Solution:
6
13
1P
1 2 3x
(X = )x 2
1
These probabilities can be shown on a diagram.
Discrete Random Variables
1 32
3
1
6
1
2
1
x
)( xXP
6
13
1P
1 2 3x
(X = )x 2
1
This is called a stick diagram.
Discrete Random Variables
4,3,2,1)( xkxxXP for
e.g. 2. Find the value of the constant k for the random variable X with p.d.f. given by
Solution:Since X is a discrete random variable,
1)( xXP
So, 14321 kkkk
110 k
10 k
Discrete Random Variables
SUMMARY• The mean, , of a discrete random
variable is given by
)( xXxP
• The mean is also referred to as the expectation or expected value of the r.v.
• can be written as E(X)• The probabilities can be given by a formula called the probability density function ( p.d.f. )• An unknown constant in the p.d.f. can be found by using
1)( xXP
Discrete Random Variables
Exercise
1. The tables show the probability distributions of 2 random variables. For each, find (i) the value of p (ii) the mean value.
(a) (b)
P 6
13
1
1 2 3x
(X = )x p P 30 60
0 1 2x
(X = )x p
2. Write out the probability distribution for the random variable, X, where the probability distribution function is
4,3,2,110
)( xx
xXP for
Discrete Random Variables
Solution:
1(a)
P 6
1
3
1
1 2 3x
(X = )x p
(b)
P 30 60
0 1 2x
(X = )x p
13
1
6
1p
3
7
6
14
2
1p
10 p
16030 p
31
2
13
3
12
6
11
602101300 mean,
mean,
)( xXxP
X is a random variable: 1)( xXP
Discrete Random Variables
1 2x
P(X = x )
3 4
2. Write out the probability distribution for the random variable, X, where the probability distribution function is
4,3,2,110
)( xx
xXP for
Solution:
10
1
10
2
10
3
10
41
5 5
2
Discrete Random Variables
1 2x
P(X = x )
3 4
2. Write out the probability distribution for the random variable, X, where the probability distribution function is
4,3,2,110
)( xx
xXP for
Solution:
10
1
5
1
10
3
5
2
Discrete Random Variables
Exercise
3,2,1)( xx
kxXP for
3. Find the exact value of the constant k for the random variable X with p.d.f. given by
Solution:
Since X is a discrete random variable, 1)( xXP
So,
1321
kkk
16
236
kkk
16
11
k 11
6k
Discrete Random Variables
Variance of a Discrete Random VariableThe variance of a discrete random variable is
found in a similar way to the one we used for the mean.
22
2 xf
fxs
variance
For a frequency distribution, the formula is
222
12 ...
xf
fxfx
Replacing by etc.
gives f
f11p
22
221
21
2 ... xpxpxs
Discrete Random Variables
22
21
22 ... pxpx
22
221
21
2 ... xpxpxs
So,
222 )( xXPx
But we must replace by and we replace s by the letter ( which is the Greek lowercase s, pronounced sigma ).
x
The variance of X is also written as Var(X).
( Notice that this expression contains the Greek capital S, , and the lowercase s, . )
Discrete Random Variables
1910
100
Tip: With a bit of practice you’ll find you can simplify the fractions without a calculator. It’s quicker and more accurate. Try these before you see my answer.
Solution:
222 )( xXPx
e.g. 1 Find the variance of X for the following:
1 2x
P(X = x )
3 4
10
1
10
2
10
3
10
4
222 )( xXPx
10
44
10
33
10
22
10
11
We first need to find the mean,
310
30
)( xXxP
222222 )3(10
44
10
33
10
22
10
11
910
64
10
27
10
8
10
1
Discrete Random Variables
SUMMARY
222 )()(Var xXPxX
• The variance, , of a discrete random variable is given by
2
• The mean of a discrete random variable is given by
)()(E xXxPX
For probability distributions ( models ) use and ( the Greek alphabet ).
2
N.B. For frequency distributions use and for the mean and variance ( the “English” alphabet ).
x 2s
Discrete Random VariablesExercis
e1. Find the variance of X for each of the following:(a) (b)
P 6
16
2
1 2 3x
(X = )x P 30 60
0 1 2x
(X = )x6
310
Solution:
(a)
222 )( xXPx2
222
3
7
6
33
6
22
6
11
)( xXxP
6
33
6
22
6
11
6
14
7
3 3
7
9
49
6
27
6
8
6
1
9
496
9
5
Discrete Random Variables
Exercise
(b)
P 30 60
0 1 2x
(X = )x 10
Solution:
222 )( xXPx
222 31602101
)( xXxP
602101 31
69152 810
Discrete Random Variables
The following slides contain repeats of information on earlier slides, shown without colour, so that they can be printed and photocopied.For most purposes the slides can be printed as “Handouts” with up to 6 slides per sheet.
Discrete Random VariablesSUMMARY• A statistical model uses probabilities to
describe a situation and to make predictions.
• A probability distribution gives the probabilities for a model.
• If X is a discrete random variable ( r.v. ), then 1)( xXP
• A variable where the sum of the probabilities of all its possible values is equal to 1 is called a random variable (r.v.). If X takes only certain values in an interval, X is a discrete r.v.
X describes the r.v.x gives the values of the r.v.
N.B.
Discrete Random Variables
f
xfx
The Mean of a Discrete Random VariableWe can find the mean of a discrete random variable in a similar way to that for data. Suppose we take our first example of rolling a die.
1171011912Frequency
654321Number on die
The mean is given by
f
fxfx ...2211
So, the mean
...2211 pxpx px
But, . . . can be replaced by , . . .
the probabilities of getting 1, 2, . . .
,1
f
f1p
f
f22p
Discrete Random Variables
When dealing with a discrete random variable, we use the letter ( pronounced mew ) for the mean (the greek letter m).
xpWe write
)( xXxP
or, more often, replacing p by , )( xXP
Notation for the Mean of a discrete Random Variable
Instead of , we can also write E(X).The notation comes from the idea of the mean being the Expected value of the r.v. X.
( Think of this as being what we expect to get on average ).
Discrete Random Variables
6,6,6,6,6,6,6,6 ////
Using for “ not a 6 “ we can write the possibilities as
/6
e.g. 1 Let X be the variable “ the number of sixes showing when 2 dice are rolled”. Show that X is a random variable and write its probability distribution in a table.
Solution:
We can have 0 sixes, 1 six or 2 sixes:
Then, )0(XP )6,6( //P 6
5
6
5
)1(XP )6,6()6,6( // PP 6
5
6
1
6
1
6
5
36
10
)2(XP )6,6(P 6
1
6
1
36
1
36
25
Discrete Random Variables
The probability table is
36
1
36
10
36
251
36
36
,36
25)0( XP ,
36
10)1( XP
36
1)2( XP
So, )( xXP
P 36
25
18
5
36
10 1 2x
(X = )x
Discrete Random Variables
SUMMARY• The mean, , of a discrete random
variable is given by
)( xXxP
• The mean is also referred to as the expectation or expected value of the r.v.
• can be written as E(X)
• The probabilities can be given by a formula called the probability density function ( p.d.f. )
Discrete Random Variables
Variance of a Discrete Random Variable
22
2 xf
fxs
variance
For a frequency distribution, the formula is
22
22
1 ...x
f
xfxf
Replacing by etc.
gives f
f11p
2222
211
2 ... xxpxps
222
21
2 ... xpxp222 )( xXPx
But for a random variable, we must replace by and we replace s by the letter (the greek s, pronounced sigma ). So,
x
The variance of X is also written as Var(X).
Discrete Random Variables
1910
100
Solution:
222 )( xXPx
e.g. 1 Find the variance of X for the following:
1 2x
P(X = x )
3 4
10
1
10
2
10
3
10
4
222 )( xXPx
10
44
10
33
10
22
10
11
We first need to find the mean,
310
30
)( xXxP
222222 )3(10
44
10
33
10
22
10
11
910
64
10
27
10
8
10
1
Discrete Random Variables
SUMMARY
222 )()(Var xXPxX
• The variance, , of a discrete random variable is given by
2
• The mean, , of a discrete random variable is given by
)()(E xXxPX
For probability distributions ( models ) use and ( the Greek alphabet ).
2
N.B. For frequency distributions use and for the mean and variance ( the “English” alphabet ).
x 2s