Download discrete random variables

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
DISCRETE RANDOM VARIABLES
1. Probability Distributions
Consider an experiment in which a fair dice is thrown and the score is noted. The table below
shows the probability distribution.
x
1
2
3
4
5
6
P( X  x)
1
6
1
6
1
6
1
6
1
6
1
6
We use X (although it can be any capital letter) to denote the score. We say the score is a discrete
random variable : discrete because it can only take certain integer values, random because there
is no pattern in the sequence of scores the dice produces, and variable because it can take
different values.
We use the corresponding lower case italic letter to represent particular values x can take.
Note that the probability distribution takes the form of a comprehensive table. We can summarise
this as the probability function.
x  1, 2, 3, 4, 5, 6
P( X  x)  1
6
Finally, note that all the probabilities add up to 1, as we would expect.
Example 1 : Two fair dice are thrown and the difference between the two scores is recorded. Find
the probability distribution for D, the difference between the two scores.
We first draw up a sample space diagram.
1
2
3
4
5
6
0
1
2
3
4
5
1
1
0
1
2
3
4
2
2
1
0
1
2
3
3
3
2
1
0
1
2
4
4
3
2
1
0
1
5
5
4
3
2
1
0
6
The probability distribution is therefore
d
0
1
2
3
4
5
P( D  d )
6
36
10
36
8
36
6
36
4
36
2
36
Example 2 : Let X be the discrete variable ‘the number of fours obtained when two dice are
rolled’. Find the probability distribution.
25
P( X  0)  56  56  36
P( X  1)  16  56  56  16  10
36
P( X  2)  16  16  361
The probability distribution is therefore
x
P( X  x)
0
1
2
25
36
10
36
1
36
Example 3 : Two tetrahedral dice, each with faces labelled 1, 2, 3 and 4, are thrown and their
scores noted. If S is the random variable ‘the sum of the scores on the two dice’, find
the probability distribution of S.
We first draw up a sample space diagram.
1
2
3
4
2
3
4
5
1
3
4
5
6
2
4
5
6
7
3
5
6
7
8
4
The probability distribution is therefore
s
2
3
4
5
6
7
8
P( S  s)
1
16
2
16
3
16
4
16
3
16
2
16
1
16
The probability function can be written as
 x 1
 16
P( X  x)  
9 x
 16
x  2, 3, 4, 5
x  6, 7, 8
Example 4 : The probability function a discrete random variable Y is given by P(Y  y)  cy 2 for
y  0, 1, 2, 3, 4 . Given that c is a constant, calculate the value of c.
We can draw up the probability distribution;
y
0
1
P(Y  y )
0
c
The probabilities must add up to 1.
2
4c
3
9c
4
16c
30c  1
c  301
Example 5 : The probability function of the discrete random variable X is given by
P( X  x)  k

3 x
4
x  1, 2, 3, ..., 
,
Find the value of the constant k.
The probability function consists of a convergent GP. We can use the formula from unit C2 for
the sum of a convergent GP with first term a and common ratio r.

k  
x 1
k
k
3 x
4
1
a
1
1 r
3
4
1  34
1
k  13
2. The Cumulative Distribution Function
The cumulative distribution function of x is the probability that a discrete random variable takes
a value less than or equal to x. We write
F( x0 )  P( X  x0 )

 P( X  x)
x  x0
Example 1 : Two fair tetrahedral dice, each with faces labelled 1, 2, 3 and 4, are thrown and their
scores noted. If G is the random variable ‘the greater of the scores on the two dice’,
a) find the probability distribution of G,
b) find the values of F(2) and F(3.9).
a) We first draw up a sample space diagram.
1
2
3
4
1
2
3
4
1
2
2
3
4
2
3
3
3
4
3
4
4
4
4
4
The probability distribution is therefore
g
1
2
3
4
P(G  g )
b)
F(2)  P(G  2)

1
16

1
16
3
16
5
16
7
16
F(3.9)  P(G  3.9)
 161  163  165
3
16
 164
 169
p150 Ex 8A
3. Expectation and Variance of a Discrete Random Variable
There are clear similarities between the theoretical probability distribution and a frequency
distribution and so there are similarities between some of the statistical measures we use for
frequency distributions and the equivalent statistics for a probability distribution. For a
probability distribution we concentrate on the expectation of X (or the expected value of X which
corresponds to the mean), and the variance of X.
Consider the probability distribution for example 1 in the previous section.
g
1
2
3
4
P(G  g )
1
16
3
16
5
16
7
16
Notice that we expect to get G  1 one-sixteenth of the time, G  2 three-sixteenths of the time,
and so on. So the expected value of G is given by
E(G )  1 161  2  163  3  165  4  167
 3 18
This value seems reasonable. It is in fact the value that the mean of G would tend to if the
experiment were carried out many, many times.
We generalise to the formula
E( X )   xP( X  x)
To find the variance, let us return to our formula for the variance of a data set,
x
variance 
2
 2
n
Notice that the first term in the RHS is the mean of the squares, which translates to the
expectation of the square of X. The second term of the RHS is the square of the mean, which
translates to the square of the expectation of X. So we have
Var( X )  E  X 2    E( X )
2
So to find the variance of our distribution,
E  G 2   12  161  22  163  32  165  42  167
 10 85
Var(G )  E  G 2    E(G ) 
2
 
 10 85  3 18

2
55
64
We can square root this to find the standard deviation, which comes out at 0.927, to three
decimal places, which again seems reasonable for our distribution.
Example 1 : A discrete random variable X has the probability function;
kx 2 x  0, 1, 2, 3
P( X  x)  
 0 otherwise
Find the values of k, E( X ) and Var( X ) .
We first set up the probability distribution.
x
0
P( X  x)
0
The probabilities must add up to 1, and so
1
k
2
4k
3
9k
14k  1
k  141
Rewriting the probability distribution,
x
P( X  x)
0
1
2
3
0
1
14
4
14
9
14
E( X )  0  0  1 141  2  144  3  149
 2 74
E  X 2   02  0  12  141  22  144  32  149
7
Var( X )  E  X 2    E( X ) 
2
 
 7  2 74
2
 19
49
Example 2 : Three coins are tossed. Find the expectation and variance for the number of heads.
Let H represent the number of heads. Some simple probability work gives us this distribution.
h
0
1
2
3
P( H  h)
1
8
3
8
3
8
1
8
By symmetry (an important shortcut in mathematics!),
E( H )  1 12
E  H 2   02  18  12  83  22  83  32  18
3
Var( H )  E  H 2    E( H ) 
2
 
 3  1 12

3
4
p157 Ex 8B
4. Linear Functions of Discrete Random Variables
Recall these results from the Measures of Dispersion topic.
data
mean
standard deviation

x

xb
 b
a
a  b

a
a
ax
ax  b
We can translate these results for use with probability distributions.
E( X  b)  E( X )  b
Var( X  b)  Var( X )
E(aX )  a E( X )
Var(aX )  a 2 Var( X )
E(aX  b)  a E( X )  b
Var(aX  b)  a 2 Var( X )
The a 2 arises because the variance is the square of the standard deviation.
Example 1 : The discrete random variable X has E( X )  3 and Var( X )  2 . Find the expectation
and variance of
a) 4 X
b) 2 X  5
c) 12 X  7
a)
E(4 X )  4 E( X )
b)
E(2 X  5)  2 E( X )  5
 23  5
1
 43
 12
Var(4 X )  42 Var( X )
 12  3  7
 8 12
Var(2 X  5)  22 Var( X )
 16  2
 32
2
Var( 12 X  7)   12  Var( X )
 4 2
8
 14  2
 12
Example 2 : For the probability distribution below, find
a) E( X )
b) Var( X )
c) E(5 X  2)
x
P( X  x)
a)
E( 12 X  7)  12 E( X )  7
c)
2
0.3
3
0.2
E( X )  2  0.3  3  0.2  6  0.05  7  0.45
 4.65
6
0.05
d) Var(3 X  4) .
7
0.45
c)
E(5 X  2)  5E( X )  2
 5  4.65  2
 21.35
b)
E( X 2 )  22  0.3  32  0.2  62  0.05  7 2  0.45
 26.85
Var( X )  E( X 2 )   E( X ) 
2
 26.85  4.652
 5.2275
p160 Ex 8C
d)
Var(3 X  4)  32 Var( X )
 9  5.2275
 47.0475
5. The Discrete Uniform Distribution
We began this topic by looking at the probability distribution when a dice is thrown.
x
1
2
3
4
5
6
P( X  x)
1
6
1
6
1
6
1
6
1
6
1
6
This is an example of a discrete uniform distribution, one in which each possible outcome has
the same probability as every other. Calculations of the expectation and variance for discrete
uniform distributions are slightly simpler than for other distributions.
Example 1 : Find the expectation and variance for the score on a dice.
E( X )  3 12
E  X 2   12  16  22  16  32  16  42  16  52  16  62  16
 15 16
Var( X )  E  X 2    E( X ) 
2
 
 15 16  3 12
2
11
 2 12
Example 2 : A bag contains four Russian banknotes, worth 5, 10, 20 and 50 roubles respectively.
An experiment consists of repeatedly taking a note from the bag at random. Find the
expectation and variance for the probability distribution.
x
5
10
20
50
P( X  x)
1
4
1
4
1
4
1
4
E( X )  (5  10  20  50)  14
 21.25
E  X 2   (5 2  102  202  502 )  14
 756.25
Var( X )  E  X 2    E( X ) 
2
 756.25  21.252
 304.6875
1
(such as scores on a
n
dice, or choosing an integer at random from 1 to 10, then we have the following standard
formulas, which must be learned as they do not appear in the formula booklet.
n 1
E( X ) 
2
(n  1)(n  1)
Var( X ) 
12
If the possible outcomes are {1, 2, 3, ..., n}, each with a probability of
Checking these formulas with example 1 above,
n 1
2
6 1

2
1
32
E( X ) 
(n  1)(n  1)
12
75

12
11
 2 12
Var( X ) 
Note that these formulas will not work with example 2 as the possible outcomes are not of the
form {1, 2, 3, ..., n}.
Example 3 : A spinner in the form of a regular octagon has sections numbered from 1 to 8.
Assuming the spinner is fair, find
a) E( X )
b) Var( X )
c) E(2 X  3)
d) Var(2 X  3) .
a)
b)
n 1
2
8 1

2
 4 12
E( X ) 
(n  1)(n  1)
12
9 7

12
 5 14
Var( X ) 
c)
E(2 X  3)  2 E( X )  3
 2  4 12  3
 12
d)
Var(2 X  3)  22 Var( X )
 4  5 14
 21
Example 4 : The random variable X has the discrete uniform distribution on the set
{1, 2, 3, ..., n}. Find n given that
a) E( X )  10
b) Var( X )  10
c) E(2 X  3)  10
d) Var(5  3 X )  36 .
E( X )  10
Var(5  3 X )  36
a)
b)
c) E(2 X  3)  10
d)
Var( X )  10
n 1
2 E( X )  3  10
( n  1)(n  1)
(3) 2 Var( X )  36
 10
 10
2
12
E( X )  3.5
Var( X )  4
2
n  19
n  1  120
n 1
(n  1)(n  1)
 3.5
4
2
2
n  121
12
n6
n 2  1  48
n  11
n 2  49
n7
p165 Ex 8D
Topic Review : Discrete Random Variables
Related documents