Vous êtes sur la page 1sur 38

# Mean and Variance

of a Distribution
By: Shoaib Ahmed

Introduction
The mean and variance
2

of a random

## variable X and of its distribution are the

theoretical
x counterparts
s 2 of the mean
variance

and

of frequency distribution.

## and the variance the spread (the variability) of

the distribution.

## The mean is defined by

a) x j f ( x j )
b)

(Discrete Distribution )

x f ( x) dx (Continuous Distribution)

## And the variance by

a) 2 ( x j ) 2 f ( x j )
b) 2

(Discrete Distribution )

2
(
x

)
f ( x) dx (Continuous Distribution)

## called the expectation of X because it gives

the average value of X to be expected in
many trials.

properties
parameters.

of

distribution

called

## of heads in a single toss of a fair coin has the

possible values X = 0 and X = 1 with
probabilities P(X = 0) = and P(X = 1) = .
Thus we have mean (discrete distribution)

0 12 1 12 12
And the variance

2 1
2 1
1
1
(0 ) (1 )
2
2
2
2

1
4

f ( x)

1
ba
0

if a x b
otherwise

x f ( x) dx

1
ba

x dx

b
1 x2
ba 2 a

a b
2

2

1
(
x

)
f
(
x
)
dx

(x

ba
a

a b )2
2

dx

(b a ) 2
12

## Expectation and Moments

Let X be a random variable with probability

## distribution f(x). The mean or expected

value of X is
For discrete:
E ( X ) x f ( x)
x

For continuous
E ( X ) x f ( x) dx
-

sampled

by

quality

inspector;

the

lot

## contains 4 good components and 3 defective

components. A sample of 3 is taken by the
inspector. Find the expected value of the
number of good components in this sample.
Solution: Let X represent the number of good

## The probability distribution of X is:

4 3

x 3 x

f ( x)
; x 0, 1, 2, 3.
7

3
A few simple calculations yield

35

Therefore,

35

35

35

E ( X ) (0) 35
35
35
35
7

good

components

and

defective

good components.

## that denotes the life in hours of a certain

electronic

device.

function is:

The

probability

density

20,000 , if x 100
3

f ( x)

otherwise

Solution:
20,000
20,000
E( X )
x
dx
dx 200.
3
2
x
x
100
100

## Theorem: Let X be a random variable with

probability distribution

## value of the random variable g(X) is

For discrete:

g ( X ) E g ( X ) g ( x) f ( x)
For continuous

g ( X ) E g ( X )

g ( x) f ( x) dx

## g(X), which depends on X; that is, each value

of g(X) is determined by knowing the values of
X. For instance,
be
or
, so
X 2 g(X)
3 X might
1
that whenever X assumes the value 2, g(X)
assumes the value g(2). In particular, if X is a
discrete

random

variable

with

probability
X2

## distribution f (x), for x = -1, 0, 1, 2, and g(X) =

then

P g ( X ) 0 P( X 0) f (0)

P g ( X ) (2) P( X 2) f (2)

2

written
g(x)
P[g(X) =
g(x)]

0
f(0)

1
f(-1) +
f(1)

2
f(2)

## g ( X ) E g ( x) 0 f (0) 1 f (1) f (1) 4 f (2)

random variable, we obtain
(1) 2 f (1) (0) 2 f (0) (1) 2 f (1) (2) 2 f (2) g ( x) f ( x)
x

## pass through a car wash between 4:00 P.M. and 5:00

P.M. on any sunny Friday has the following probability
distribution:

x
4
P[X = x] 1/12

5
1/12

6
1/4

7
1/4

8
1/6

9
1/6

## dollars, paid to the attendant by the manager. Find the

attendant's expected earnings for this particular time
period.

## Solution: The attendant can expect to

g ( X ) E g ( X ) E g (2 X 1)

12

12

(2 x 1) f ( x)

x4

7 1 9 1 11 1 13 1 15 1 17 1
12.67

density function

1 x 2 , 1 x 2
f ( x) 3
0,
elsewhere

## Find the expected value of g(X) = 4 X + 3.

Solution: We have

g ( X ) E g ( X )

g ( x) f ( x) dx

-
2

(4 x 3) x 2
E 4 X 3
dx 8
3
-1

Joint Probability
Distributions
There will be situations where we may find it

## desirable to record the simultaneous outcomes of

several random variables.
For example, we might measure the amount of

## precipitate P and volume V of gas released from a

controlled chemical experiment, giving rise to a
two-dimensional sample space consisting of the
outcomes (p, v).

## random variables, the probability distribution

for their simultaneous occurrence can be
represented by a function with values f (x, y)
for any pair of values (x, y) within the range of
the random variables X and Y. It is customary
to

refer

to

this

function

as

the

joint

## probability distribution or probability mass

function of the discrete random variables X and
Y if

1) f ( x, y ) 0 for all ( x, y ),
2) f ( x, y ) 1,
x

3) P( X x, Y y ) f ( x, y ).
P X , Y
For any region A in the xy plane,

f ( x, y).
A

## selected at random from a box that contains 3

blue refills, 2 red refills, and 3 green refills. If X
is the number of blue refills and Y is the
number of red refills selected, find

x, y x y 1

## a) the joint probability function f (x,y),

b) P[(X, Y) A], where A is the region

## Solution: The possible pairs of values (x, y) are (0, 0),

(0, 1), (1, 0), (1, 1), (0, 2), and (2, 0). Now, f (0, 1), for
example, represents the probability that a red and a
green refill are selected. The total number of equally

8 from the 8 is
likely ways of selecting any 2 refills
28
2
. The number of ways of selecting
1 red from 2 red
2 3 from 3 green refills is
refills and 1 green
6
1 1

## .Hence f (0, 1) = 6/28 = 3/14. Similar calculations yield

the probabilities for the other cases, which are
presented in Table. Note that the probabilities sum to 1.

x
f (x, y)

Row
Totals

3/28

9/28

3/28

15/28

3/14

3/14

3/7

1/28

1/28

5/14

15/28

3/28

Column Totals

## be represented by the formula:

f ( x, y )

3

x

2 3

y 2-x-y ,
8

2

for x 0, 1; y 0, 1, 2 and 0 x y 2.

x, y
b) P[(X, Y) A], where A is the region

x y 1.

P X , Y A P X Y 1
f (0, 0) f (0, 1) f (1, 0)
3 3 9
9

28 14 28 14

## density function of the continuous random

variables X and Y if

1) f ( x, y ) 0 for all ( x, y ),

2)

f ( x, y) dx dy 1,

3) P X , Y A

f ( x, y) dx dy,

## of chocolates with a mixture of creams,

toffees, and nuts coated in both light and dark
chocolate. For a randomly selected box, let X
and Y, respectively, be the proportions of the
light and dark chocolates that are creams and
suppose that the joint density function is:
2 (2 x 3 y ), 0 x 1, 0 y 1
f ( x, y ) 5

otherwise

## a) Verify condition (2) of Definition 2.

b) Find P X , Y A , where A

x, y 0 x 12 , 14 y 12

) Solution a):

11

f ( x, y ) dx dy 2 (2 x 3 y ) dx dy
00
1

x 1

2
x
6
xy

dy
5

5
x 0
0
1
1
2
2 y 3y
2 3
2 6y

1
dy

5
5 5
5 5
5
0
0

Solution b):

P X , Y A P 0 X 1 , 1 Y 1

2 4

x 12

2 x 2 6 xy
2 ( 2 x 3 y ) dx dy

f
(
x
,
y
)
dx
dy

dy

5
5 5
1 0
1
x 0

4
4
1 1
2 2

y 3y2
1 3y

dy

10

5
10 5

1

10

1 3 1 3
0.08125
2 4 4 16

Marginal Distributions
Given the joint probability distribution f (x, y) of the

## discrete random variables X and Y, the probability

distribution g(x) of X alone is obtained by summing f(x,
y) over the values of Y. Similarly, the probability
distribution h(y) of Y alone is obtained by summing f(x,
y) over the values of X. We define g(x) and h(y) to be the
marginal distributions of X and Y, respectively. When
X and Y are continuous random variables, summations
are replaced by integrals.

## The marginal distributions of X alone and

of Y alone are:

g ( x) f ( x, y ) and h( y ) f ( x, y )
Y

## for the discrete case, and

g ( x)

f ( x, y ) dy and h( y )

f ( x, y) dx

x
f (x, y)

Row
Totals

3/28

9/28

3/28

15/28

3/14

3/14

3/7

1/28

1/28

5/14

15/28

3/28

Column Totals

## Solution: For the random variable X, we see

that

3 3 1
5
g (0) f (0, 0) f (0, 1) f (0, 2)

28 14 28 14
9
3
15
g (1) f (1, 0) f (1, 1) f (1, 2)
0
28 14
28
and
3
3
g (2) f (2, 0) f (2, 1) f (2, 2)
00
28
28

## density function of:

2 (2 x 3 y ), 0 x 1, 0 y 1
f ( x, y ) 5

otherwise

Solution:

g ( x)

f ( x, y ) dy

2 ( 2 x 3 y ) dy
5

4 xy 6 y

5
10

y 1

y 0

4x 3

5

And

h( y )

f ( x, y) dx

2 (2 x 3 y ) dy
5

2(1 3 y )

Definition

3: Let X and

Y be random

## variables with joint probability distribution f(x,

y). The mean or expected value of the random

g ( x, y) f ( x, y )

## variable g(X, Y) is:

g ( X ,Y ) E g ( X , Y )

## if X and Y are discrete, and

g ( X ,Y ) E g ( X , Y )

g ( x, y) f ( x, y) dx dy

if X and Y are continuous.

## variables with joint probability distribution

indicated in Table. Find the expected value of
g (X, Y) = XY.
f (x, y)

Row
Totals

3/28

9/28

3/28

15/28

3/14

3/14

3/7

1/28

1/28

5/14

15/28

3/28

Column Totals

## Joint Probability Distribution

Solution: By definition

E ( XY )

x 0 y 0

## (1)(0) f (1,0) (1)(1) f (1,1) (2)(0) f (2,0)

3
(0)(2) f (0,2) f (1,1)
14