Docsity

Lecture 10: Probability Density Functions of Continuous Random Variables, Exams of Mathematical Methods

Partial preview of the text

Download Lecture 10: Probability Density Functions of Continuous Random Variables and more Exams Mathematical Methods in PDF only on Docsity!

Lecture 10 : Continuous Random Variables

0/ 21

1/ 21

In this section you will compute probabilities by doing integrals.

Definition

A random variable X is said to be continuous if there exists a nonnegative

function f (x) definition interval (−∞, ∞) such that for any interval [a, b] we have,

P(a ≤ X ≤ b) =

∫^ b

a

f (x)dx

3/ 21

Z f (x) , P(X = x) in fact f (x) is not the probability of anything f is a density

i.e., something you integrate to get the magnitude of a physical quantity.

Think of a wire stretching from a to b with density λ

gm cm

Then the actually mass of the wire between a and b is

∫ b

a λ(x)dx.

4/ 21

So λ is mass per unit length

λ(x) = lim 4 m

4 x

Similarly f (x) = probability per unit length.

So both λ(x) resp. f (x) are densities which must be integrated to get the actual

length resp. probability.

Properties of f (x)

(i) f (x) ≥ 0 ← no immediate physic interpretation, see later.

(ii)

−∞ f^ (x)dx^ =^1 ←^ total probability = 1

Any function f (x) satisfying (i) and (ii) is a probability density function.

6/ 21

So for any interval [a, b] which is a subinterval of [ 0 , 1 ] we have the formula

P(X ∈ [a, b]) = P(a ≤ X ≤ b) =

∫ b

a

1 dx = b − a = length ([a, b])

This is a continuous random variable. The density function is the “characteristic

function of [ 0 , 1 ]” i.e.,

f (x) =

1 , 0 ≤ x ≤ 1

0 , otherwise.

7/ 21

Definition

A continuous random variable X is said to have uniform distribution on [ 0 , 1 ],

abbreviate X ∼ U( 0 , 1 ) if its pdf f is given by

f (x) =

1 , 0 ≤ x ≤ 1

0 , otherwise.

More generally suppose we replace [ 0 , 1 ] by the interval [a, b]

Z We can’t have

f (x) =

1 , a ≤ x ≤ b

0 , otherwise.

9/ 21

Another Example

Linear density

Consider the function

f (x) =

2 x, 0 ≤ x ≤ 1

0 , otherwise

Then the total probability is

∫^ ∞

−∞

f (x)dx =

∫^1

0

2 x = (x^2 )

x= 1

x= 0

10/ 21

Since f (x) ≥ 0 and

−∞

f (x)dx = 1

f (x) is indeed a pdf.

Problem

For the linear density compute

P

≤ X ≤ 3

Solution

P

4 ≤^ X^ ≤^

∫^ ∞

−∞

f (x)dx =

∫^34

(^14)

2 xdx

= (x^2 )

∣∣^ x=^

(^34)

x= 14 =^

16 −^

16 =^

No decimals please.

12/ 21

Good Citizen Computations

The Cumulative Distribution Function

Definition

Let X be a continuous random variable with pdf f. Then the cumulative distribution function F, abbreviate cdf , is defined by

F(x) =

∫^ x

−∞

f (x)dx

= the area under the graph of f to the left of x.

13/ 21

This area is

We will compute the cdfs for X ∼ U( 0 , 1 ) and X ∼ the linear distribution.

X ∼ U( 0 , 1 )

15/ 21

F(x) =?, 0 ≤ x ≤ 1

This is where the action is.

How much area have we accumulated to the left of x. It is the area of a rectangle

with base x and height 1 hence area x · 1 = x. Thus

F(x) = x, 0 ≤ x ≤ 1

We could have done this with integrals instead of pictures but pictures are better.

16/ 21

We have obtained

F(x) =

0 , x < 0

x, 0 ≤ x ≤ 1

1 , x > 1

Lesson

cdf ’s of continuous random variables are continuous and satisfy

x→−∞^ lim F(x) =^0

x^ lim→∞ F(x) =^1

18/ 21

So we have to compute the area of a triangle with base b = x and height

h = 2 x. But

area = 1

bh = 1

x( 2 x) = x^2

So

F(x) =

0 , x < 0

x^2 , 0 ≤ x ≤ 1

1 , x > 1

Do this with integrals.

19/ 21

Importance of the cdf

Coded into the cdf F are all the probabilities P(a ≤ X ≤ b).

Theorem

P(a ≤ X ≤ b) = F(b) − F(c).

Proof.

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

But because X is continuous

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

So

P(a ≤ X ≤ b) = P(X ≤ b) − P(X ≤ 0 )

= F(b) − F(a)