• No results found

MTH 361 Lectures 14-16

N/A
N/A
Protected

Academic year: 2021

Share "MTH 361 Lectures 14-16"

Copied!
31
0
0

Loading.... (view fulltext now)

Full text

(1)

MTH 361

Lectures 14 - 16

Yevgeniy Kovchegov

(2)

Topics:

• Continuous random variables.

• Exponential random variables.

• Uniform random variable.

• Normal random variable.

• Expectation of continuous variables.

(3)

Continuous random variables.

Definition. We say that X is a continuous random variable if there exists a nonnegative function f (x) defined for all real x such that for any a ≤ b,

P (a ≤ X ≤ b) =

Z

b a f (x)dx f(x) x a b

(4)

Continuous random variables.

Definition. We say that X is a continuous random variable if there exists a nonnegative function f (x) defined for all real x such that for any a ≤ b,

P (a ≤ X ≤ b) =

Z

b a f (x)dx Properties: • ∞

R

−∞ f (x)dx = P (−∞ < X < ∞) = 1, where ∞

R

−∞ f (x)dx = lim a→∞ a

R

−a f (x)dx • P (X = a) = a

R

a

f (x)dx = 0 for any real a.

• Hence

P (a < X ≤ b) = P (a < X < b) = P (a ≤ X < b) = P (a ≤ X ≤ b) =

Z

b

a

(5)

Continuous random variables.

Definition. Let X be a continuous random variable with density

function f (x). Then its cumulative distribution function (cdf ) is

F (a) = P (X ≤ a) =

Z

a −∞ f (x)dx f(x) x a F(a)=P(X < a)

• Here, for any a ≤ b,

(6)

Continuous random variables.

Definition. Let X be a continuous random variable with density

function f (x). Then its cummulative distribution function (cdf )

is F (a) = P (X ≤ a) =

Z

a −∞ f (x)dx f(x) x a F(a)=P(X < a)

• Here, for any real a, the derivative

F0(a) = d

da

Z

a

−∞

f (x)dx = f (a)

(7)

Continuous random variables.

• Example. Let X be a continuous random variable with density function

f (x) =

n

e−x if x ≥ 0

0 if x < 0

(8)

Continuous random variables.

• Example (continued). We want to check f (x) is indeed a probability density function, and find P (1 < X < 2).

Solution: Here f (x) is nonnegative and

Z

∞ −∞ f (x)dx =

Z

0 −∞ 0· dx +

Z

∞ 0 e−xdx = 0 +

h

− e−x

i

∞ 0 = 1 Thus f (x) is indeed a probability density function.

(9)

Continuous random variables.

• Example (continued). We want to check f (x) is indeed a probability density function, and find P (1 < X < 2).

(10)

Exponential random variables.

• Given λ > 0. Let X be a continuous random variable with density function

f (x) =

n

λe−λx if x ≥ 0

0 if x < 0

Then X is said to be an exponential random variable with

(11)

Exponential random variables.

• Given λ > 0. Let X be a continuous random variable with density function

f (x) =

n

λe−λx if x ≥ 0

0 if x < 0

Then X is said to be an exponential random variable with

pa-rameter λ. • Check:

Z

∞ −∞ f (x)dx =

Z

0 −∞ 0· dx +

Z

∞ 0 λe−λxdx = 0 +

h

− e−λx

i

∞ 0 = 1 Thus f (x) is indeed a probability density function.

• Note: Exponential random variable is a continuous analogue to the geometric random variable. In particular it also satisfies the following memorylessenss property:

(12)

Uniform random variables.

• Consider an interval [α, β], where α < β. Let X be a continuous random variable with density function

f (x) =

(

1

β−α if α ≤ x ≤ β

0 otherwise

Then X is said to be an uniform random variable over [α, β].

• Check:

Z

∞ −∞ f (x)dx =

Z

α −∞ 0·dx+

Z

β α dx β − α+

Z

∞ β 0·dx = 0+

h

x β − α

i

β α +0 = β β − α − α β − α = 1

(13)

Continuous random variables.

Definition. Let X be a continuous random variable with density function f (x). Then its expectation is

E[X] =

Z

−∞

xf (x) dx

Properties:

• For any real valued function g, g(X) will also be a random

variable, and

E[g(X)] =

Z

−∞

g(x)f (x) dx

• Markov inequality. If X is a random variable that takes only nonnegative values, then for any α > 0,

P (X ≥ α) ≤ E[X]

α

• Chebyshev inequality. If X is a random variable with finite mean µ and variance, then for any κ > 0,

P (|X − µ| ≥ κ) ≤ V ar(X)

(14)

Normal random variables.

!4 !2 0 2 4 6 8 10 12 14 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2

X is a Normal (Gaussian) random variable with parameters

µ and σ2 if its density function is

f (x) =

1

2πσ

2

e

(x−µ)2

(15)

Normal random variables.

!6 !4 !2 0 2 4 6 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

A normal random variable X is said to be standard normal if

its parameters µ = 0 and σ2 = 1, and therefore

f (x) =

1

e

(16)

Normal random variables.

!5 0 5 10 15 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 N (µ, σ2

) denotes normal distribution with parameters µ and σ2.

Here I plotted two normal densities, one standard normal N (0, 1)

(17)

Normal random variables.

We need to check that the standard normal density function

(18)

Normal random variables.

We let I =

R

−∞

e−x22dx, and showed that I2 =

R

−∞ ∞

R

−∞ e−x2+y22 dx dy

Use polar coordinates: let x = r cos θ and y = r sin θ, where

(19)

Normal random variables.

So I2 = 2π and I = ∞

R

−∞ e−x22 dx = √ 2π Hence, ∞

R

−∞ 1 √ 2πe −x2 2dx = 1

Check: For a general N (µ, σ2) random variable,

(20)

Expectation and variance.

Recall

Definition. Let X be a continuous random variable with density function f (x). Then its expectation is

E[X] =

Z

−∞

xf (x) dx

Then

• For any real valued function g, g(X) will also be a random

variable, and E[g(X)] =

Z

∞ −∞ g(x)f (x) dx and

• Given constants α and β,

(21)

Expectation and variance.

Now, let X be a random variable with mean E[X] = µ. • Definition. The variance of X is

V ar(X) = E



(X − µ)2



• Definition. The standard deviation of X is

SD(X) =

p

V ar(X) =

q

E



(X − µ)2



Finally,

• Theorem. The variance of X is

(22)

Exponential random variables.

Example. Given λ > 0. Let X be a continuous random variable with density function

f (x) =

n

λe−λx if x ≥ 0

0 if x < 0

Then X is said to be an exponential random variable with

pa-rameter λ.

We want to find its expectation. E[X] =

Z

∞ −∞ x · f (x)dx =

Z

∞ 0 λx · e−λxdx

• Recall the integration by parts formula,

Z

uv0dx = uv −

Z

u0vdx

Here we let u(x) = x and v(x) = −e−λx. Then u0(x) = 1 and

(23)

Exponential random variables.

Example (continued).

• Recall the integration by parts formula,

Z

uv0dx = uv −

Z

u0vdx

Here we let u(x) = x and v(x) = −e−λx. Then u0(x) = 1 and

v0(x) = λe−λx, and ∞

R

0 λx · e−λxdx = ∞

R

0 u(x)v0(x)dx E[X] =

Z

∞ 0 λx·e−λxdx =

h

−xe−λx

i

∞ 0 −

Z

∞ 0 (−e−λx)dx =

Z

∞ 0 e−λxdx = 1 λ ·

Z

∞ 0 λe−λxdx = 1 λ

as we have shown that

(24)

Normal random variables.

Example. Let X be a Normal (Gaussian) random variable

with parameters µ and σ2. Its density function is

(25)

Normal random variables.

Example (continued). Let y = x−µσ , then dx = σdy and

E[X] = √1 2π

Z

∞ −∞ x − µ σ ·e −(x−µ)2 2σ2 dx +µ = σ √ 2π

Z

∞ −∞ y·e−y22 dy +µ = µ

since y · e−y22 is an odd function, implying

Z

0 −∞ y · e−y22 dy = −

Z

∞ 0 y · e−y22 dy

(26)

Exponential random variables.

Example. Given λ > 0. Let X be a continuous random variable with density function

f (x) =

n

λe−λx if x ≥ 0

0 if x < 0

Then X is said to be an exponential random variable with

pa-rameter λ. We know its expectation E[X] = 1λ.

We want to find its variance, V ar(X) = E[X2] −



E[X]



2 • Here V ar(X) = E[X2]− 1 λ2 =

Z

∞ 0 λx2 · e−λxdx − 1 λ2

Once again, recall the integration by parts formula,

Z

uv0 dx = uv −

Z

u0v dx

Here we let u(x) = x2 and v(x) = −e−λx. Then u0(x) = 2x and

(27)

Exponential random variables.

Example (continued). Once again, recall the integration by parts formula,

Z

uv0 dx = uv −

Z

u0v dx

Here we let u(x) = x2 and v(x) = −e−λx. Then u0(x) = 2x and

(28)

Normal random variables.

Example. Let X be a Normal (Gaussian) random variable

with parameters µ and σ2. Its density function is

f (x) =

1

2πσ

2

e

(x−µ)2

2σ2

− ∞ < x < ∞

We have proved that E[X] = µ.

We want to find its variance, V ar(X)

• We let y = x−µσ , then dx = σdy and

(29)

Normal random variables.

Example (continued). We let y = x−µσ , then dx = σdy and

V ar(X) = E[(X−µ)2] = √ 1 2πσ2

Z

∞ −∞ (x−µ)2·e−(x−µ)22σ2 dx = σ2 √ 2π

Z

∞ −∞ y2·e−y22 dy

Now, let u(y) = y and v(y) = −e−y22. Then u0(y) = 1 and

v0(y) = y · e−y22, and ∞

R

−∞ y2 · e−y22 dy = ∞

R

−∞ u(y)v0(y)dy

Integrating by parts, we obtain

(30)

Expectation and variance.

• Given λ > 0. Let X be a continuous random variable with density function

f (x) =

n

λe−λx if x ≥ 0

0 if x < 0

Then X is said to be an exponential random variable with

pa-rameter λ. 1 1 2 f(x)=

{

e if x > 0 0 if x < 0 -x

(31)

Expectation and variance.

X is a Normal (Gaussian) random variable with parameters

µ and σ2 if its density function is

f (x) =

1

2πσ

2

e

(x−µ)2 2σ2

− ∞ < x < ∞

!4 !2 0 2 4 6 8 10 12 14 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2

References

Related documents

Note 1: If one of the components of the net external force is zero, the corresponding component of the total momentum of the system is conserved (even though the total

The God of peace, who brought again from the dead our Lord Jesus Christ, the great Shepherd of the sheep, through the blood of the everlasting covenant, make you perfect in every

Given a requirements document for a LabVIEW development project, you will follow a software development process to design, implement, document and test the key application features in

that described the behavior of the electron in a hydrogen atom as a

Conclusions: Acute supplementation of Na-CIT prior to 200 m swimming performance led to a modest time improvement and higher blood lactate concentrations in only half of the

to 2010 the Conservative Party did not use any form of positive action, but for that election an ‘A List’ system was used which ensured that women candidates stood in seats the

Finally, the Resident will, from this experience, develop policies and procedures in collaboration with UASC staff, Library leadership, and University stakeholders that will help

Overall, the statistical analysis indicates that DG offers are most strongly predicted by individual income, household size, the number of examples given in the one-on-one sessions,