Download ITD1111_DMS_10_Expectation

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
Unit 10 Expectation
Unit 10 Expectation
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
1
Unit 10 Expectation
10.1 Mathematical expectation
In each trial of an experiment, a random
variable X may assume any value in the
range space R. In the long-run, an average
and a variance may be associated with X.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
2
Unit 10 Expectation
Example 10.1-1 (1/4)
The length in meters, X, of metal bars
produced in a machine is such that
P(X < 4.5) = 0.1
P(4.5  X  5) = 0.7
P(X > 5) = 0.2.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
3
Unit 10 Expectation
Example 10.1-1 (2/4)
If 4.5  X  5, a bar will be accepted by the
customers with a profit of $52.
If X < 4.5, a bar will be discarded with a
loss of $20.
If X > 5, a bar will be cut to the specified
length and the profit will be reduced to $48.
Find the expected profit.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
4
Unit 10 Expectation
Example 10.1-1 (3/4)
Consider N bars be produced and
let A be the no. of bars accepted,
R be the no. of bars rejected, and
C be the no. of bars that have to be cut.
52 A  (20) R  48C
Average profit P =
N
A
R
C
= 52 N  20 N  48 N
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
5
Unit 10 Expectation
Example 10.1-1 (4/4)
A
R
C
P  52 lim
 20 lim
 48 lim
 Nlim

N  N
N  N
N  N
= 52(0.7)  20(0.1)  48(0.2)
= 44
The expected profit is therefore $44.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
6
Unit 10 Expectation
10.2 Expected value (definition)
In general, let X be a discrete r.v. with
possible values x1, x2, …, xn and
corresponding probabilities p1, p2, …, pn.
The expectation of X is defined as
E(X) =
 xp( x) = x1p1 + x2p2 + … + xnpn .
x
The expectation of X is also called the
expected value of X.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
7
Unit 10 Expectation
Example 10.2-1
The random variable X has the distribution
shown below
x
1
2
3
4
P(X = x) 0.3 0.2 0.4 0.1
The expected value of X, E(X)
= (1)(0.3) + (2)(0.2) + (3)(0.4) + (4)(0.1)
= 2.3
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
8
Unit 10 Expectation
Example 10.2-2 (1/2)
The random variable X has a probability
distribution given by
c
P(X = x) =
, x = 1, 2, 3, 4, 5.
x
(a) Find c.
(b) Find E(X)
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
9
Unit 10 Expectation
Example 10.2-2 (2/2)
1 1 1 1

(a) c1       1
2 3 4 5

60
c=
137
c
c
c
c
(b) E(X) = (c)(1)  ( )( 2)  ( )(3)  ( )( 4)  ( )(5)
2
3
4
5
= 5c
300
=
137
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
10
Unit 10 Expectation
Example 10.2-3
In a game, a player tosses 3 fair coins. He
wins $10 if 3 heads occur, $5 if 2 heads
occur, $2 if only 1 head occurs and losses
$15 if no heads occur. What is his expected
gain?
His expected gain
= 10(1/8)+5(3/8)+3(3/8)-15(1/8)
= 2 (dollars)
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
11
Unit 10 Expectation
10.3 Function of a random
variable
If X is a discrete random variable with
probability distribution p(x) and if g(x) is a
real-valued function of X, then the expected
value of g(X) is defined as
E[g(X)] =
 g ( x) p( x)
x
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
12
Unit 10 Expectation
Example 10.3-1 (1/3)
A salesman is employed by a computer
manufacturer to sell PC’s. The salary he
gets in a day is calculated by the formula
g(x) = 90 + 60x
where x is the number of PC’s he sells in
that day.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
13
Unit 10 Expectation
Example 10.3-1 (2/3)
Assume that in each day he may sell zero to
four PC’s with probabilities listed in the
table below:
Number of PC’s, x 0
1 2 3
4
Probability, p(x) 0.05 0.2 0.4 0.2 0.15
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
14
Unit 10 Expectation
Example 10.3-1 (3/3)
Let X be the number of PC’s sold in a day.
His expected daily salary is
E[g(X)] = g(0)p(0) + g(1)p(1) + g(2)p(2) +
g(3)p(3) +g(4)p(4)
= (90)(0.05) + (90+60)(0.2) +
(90+120)(0.4) + (90+180)(0.2) +
(90+240)(0.15)
= 222 (dollars)
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
15
Unit 10 Expectation
Expectation of aX + b
It can be proved that, for any real numbers
a and b,
E(aX + b) = aE(X) + b .
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
16
Unit 10 Expectation
Example 10.3-2
In Example 7.3-5,
expected daily salary
= E(90+60X)
= 90 + 60E(X)
= 90 + 60[(0)(0.05) + (1)(0.2) + (2)(0.4)
+ (3)(0.2) + (4)(0.15)]
= 222 (dollars)
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
17
Unit 10 Expectation
10. 4 Variance of a random
variable
The variance of a random variable X is
defined as
V(X) = 2 = E[(X –)2] ,
where  = E(X).
The standard deviation, , of a random
variable X is defined
=
IT Disicipline
E[( X   ) ] .
2
ITD1111 Discrete Mathematics & Statistics
STDTLP
18
Unit 10 Expectation
Example 10.4-1 (1/2)
The probability distribution of the random
variable X is shown below:
X
P(X = x)
1
2
3
0.1 0.5 0.4
Find E(X) and V(X).
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
19
Unit 10 Expectation
Example 10.4-1 (2/2)
xp( x)
E(X) = 
x
= 1(0.1) + 2(0.5) + 3(0.4)
= 2.3
V(X) = E[(X –)2]
  ( x   ) p ( x)
x
= (1 – 2.3)2(0.1) + (2 – 2.3)2(0.5) + (3 – 2.3)2(0.4)
= 0.41
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
20
Unit 10 Expectation
Example 10.4-2 (1/2)
Daily sales records for a shop selling electric
appliances show that it will sell zero, one, two or
three air-conditioners with the probabilities:
Number of Sales 0
1
2
3
Probability 0.5 0.3 0.15 0.05
Calculate the expected value, variance and
standard variation for daily sales.
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
21
Unit 10 Expectation
Example 10.4-2 (2/2)
Expected value
= (0)(0.5) + (1)(0.3) + (2)(0.15) + (3)(0.05)
= 0.75
Variance
= (0 - 0.75)2(0.5) + (1 – 0.75)2(0.3) +
(2 – 0.75)2(0.15) + (3 – 0.75)2(0.05)
= 0.7875
Standard deviation = 0.7875 = 0.8874
IT Disicipline
ITD1111 Discrete Mathematics & Statistics
STDTLP
22
Related documents