Expected Value and Variance of a Random Variable, Slides of Probability and Statistics

The concepts of expected value and variance for a continuous random variable. It provides formulas for calculating these statistics and interprets their meanings. The document also includes examples of calculating expected value and variance for uniform, exponential, and normal distributions.

Typology: Slides

2021/2022

Uploaded on 09/12/2022

rajeshi
rajeshi ๐Ÿ‡บ๐Ÿ‡ธ

4.1

(9)

237 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
12.3: Expected Value and Variance
If Xis a random variable with corresponding probability density
function f(x), then we define the expected value of Xto be
E(X) := Zโˆž
โˆ’โˆž
xf(x)dx
We define the variance of Xto be
Var(X) := Zโˆž
โˆ’โˆž
[xโˆ’E(X)]2f(x)dx
1
Alternate formula for the variance
As with the variance of a discrete random variable, there is a
simpler formula for the variance.
2
pf3
pf4
pf5
pf8

Partial preview of the text

Download Expected Value and Variance of a Random Variable and more Slides Probability and Statistics in PDF only on Docsity!

12.3: Expected Value and Variance

If X is a random variable with corresponding probability density function f (x), then we define the expected value of X to be

E(X) :=

โˆ’โˆž

xf (x)dx

We define the variance of X to be

Var(X) :=

โˆ’โˆž

[x โˆ’ E(X)]^2 f (x)dx

1

Alternate formula for the variance

As with the variance of a discrete random variable, there is a simpler formula for the variance.

Var(X) =

โˆ’โˆž

[x โˆ’ E(X)]f (x)dx

=

โˆ’โˆž

[x^2 โˆ’ 2 xE(X) + E(X)^2 ]f (x)dx

=

โˆ’โˆž

x^2 f (x)dx โˆ’ 2 E(X)

โˆ’โˆž

xf (x)dx

+E(X)^2

โˆ’โˆž

f (x)dx

=

โˆ’โˆž

x^2 f (x)dx โˆ’ 2 E(X)E(X) + E(X)^2 ร— 1

=

โˆ’โˆž

x^2 f (x)dx โˆ’ E(X)^2

3

Interpretation of the expected value and the

variance

The expected value should be regarded as the average value. When X is a discrete random variable, then the expected value of X is precisely the mean of the corresponding data.

The variance should be regarded as (something like) the average of the difference of the actual values from the average. A larger variance indicates a wider spread of values.

As with discrete random variables, sometimes one uses the standard deviation, ฯƒ =

Var(X), to measure the spread of the distribution instead.

Solution, continued

We compute โˆซ (^) โˆž

โˆ’โˆž

x^2 f (x)dx =

0

x^2 dx

= 13 x^3 |x x=1=

= (^13)

7

Solution, completed

Hence,

Var(X) =

โˆ’โˆž

x^2 f (x)dx โˆ’ E(X)^2

= 13 โˆ’ (^14)

= 121

Another example

Let X be the random variable with probability density function

f (x) =

ex^ if x โ‰ค 0 0 if x > 0

Compute E(X) and Var(X).

9

Solution

Integrating by parts with โˆซ u = x and dv = exdx, we see that xexdx = xex^ โˆ’ ex^ + C. Thus,

E(X) =

โˆ’โˆž

xf (x)dx

โˆ’โˆž

xexdx

0 rโ†’โˆ’โˆž^ lim

r

xexdx = (^) rโ†’โˆ’โˆžlim [โˆ’ 1 โˆ’ rer^ + er^ ] = 1

[We used Lโ€™Hห†opitalโ€™s rule to see that limrโ†’โˆ’โˆž rer^ = limrโ†’โˆ’โˆž (^) eโˆ’rr = limrโ†’โˆ’โˆž (^) โˆ’e^1 โˆ’r = 0.]

Solution

First, we must find the probability density function of X. Differentiating we find that the function

f (x) =

cos(x) if 0 โ‰ค x โ‰ค ฯ€ 2 0 otherwise

is the derivative of F at all but two points. Thus, f (x) is a probability density function for X.

13

Solution, continued

E(X) =

โˆ’โˆž

xf (x)dx

โˆซ ฯ€ 2

0

x cos(x)dx

= (x sin(x) + cos(x))|x=^

ฯ€ 2 x= = ฯ€ 2 โˆ’ 1

Solution, finished

Integrating by parts, we compute

Var(X) =

โˆซ ฯ€ 2

0

x^2 cos(x)dx โˆ’ E(X)^2

= (x^2 sin(x) โˆ’ 2 sin(x) + 2x cos(x))|x=^

ฯ€ 2 x=0 โˆ’^ (^

ฯ€ 2

โˆ’ 1)^2

= ฯ€

2 4 โˆ’^2 โˆ’^ (^

ฯ€^2 4 โˆ’^ ฯ€^ + 1) = ฯ€ โˆ’ 3