Lecture 03: Continuous random variables Ba Chu E-mail: ba [email protected] Web: http://www.carleton.ca/∼bchu

(Note that this is a lecture note. Please refer to the textbooks suggested in the course outline for details. Examples will be given and explained in the class.)

1

Objectives

In reality, we often encounter situations where the random event under our consideration has uncountable prospects. The purpose of this lecture is to introduce the concept of continuous random variables associated with events of uncountable numbers of outcomes. First, I will motivate this concept with the continuous uniform distribution. Second, I will define the probability density functions (pdf) and the cumulative distribution functions (cdf) of continuous random variables. Third, I will explain typical continuous random variables such as the normal random variable, the t random variable, and the χ2 random variable. Fourth, I will explain the concept of moment generating functions (mgf) and their usefulness in deriving moments of random variables. Examples will be explained along the way.

2

Motivation

Consider a random variable X whose set of possible values is the unit interval, i.e., [0, 1]. Specifically, we ask the following question: what probability distribution formalizes the notion of ‘equally likely’ outcomes in the 1

unit interval [0, 1]? We have learnt to formalize the notion of ‘equally likely’ by assigning the same probability to each individual outcome in the same space. Thus, if S = {s1 , . . . , sN }, then P (si ) = 1/N . Let E = {si1 , . . . , sik } denote an event in S, we have

P (E) =

k X

P ({sij }) =

j=1

k X 1 k = . N N j=1

Now, if E is an event with countable outcomes with real values in [0, 1] (say, E = { 21 , 13 , 14 , . . . }, a difficulty arises. This is because, if we assume that every value in [0,1] is equally likely, i.e., P (X = x) =  for every x ∈ [0, 1], we obtain ∞ X



X 1 P (E) = P ({ }) =  = ∞. j j=2 j=2

(2.1)

Hence, we must assign a probability of zero to every outcome in [0, 1], i.e., P (X = x) = 0 for every x ∈ [0, 1]; thus P (E) = 0. This may give you confusion. However, in probability we always emphasize that If an event is impossible, then it necessarily has zero probability; however, having zero probability does not necessarily mean that an event is impossible. As we have seen, probabilities of any countable event must be zero. Hence, to obtain positive probabilities, we must consider events whose cardinality is uncountable. Consider the events [0, 0.5] and [0.5, 1]. Because all outcomes are equally likely, these events must have the same probability, i.e., P (X ∈ [0, 0.5]) = P (X ∈ [0.5, 1]). Since P (X ∈ [0, 1]) = 1, we have: P (X ∈ [0, 0.5]) = P (X ∈ [0.5, 1]) = 0.5. The intuitive conclusion here is that the probability of each subinterval equals the proportion of the entire interval occupied by the subinterval. In mathematical notation, our conclusion can be expressed as follows: Suppose that X(S) = [0, 1] and each x ∈ [0, 1] is equally likely. If 0 ≤ a ≤ b ≤ 1, then P (X ∈ [a, b]) = b − a. 2

The probability distribution that we discussed above is called the uniform distribution. If X ∼ Uniform[0, 1], the the cdf of X is given by: • If y < 0, then F (y) = P (X ≤ y) = 0. • If y ∈ [0, 1], then F (y) = y. • If y > 1, then F (y) = 0.

3

Basic Concepts

Consider a real-valued function f : R −→ R. Let Area[a,b] (f ) denote the region bounded by the graph of f at the specified end points a and b. By elementary integral calculus, we can determine that Rb Area[a,b] (f ) = a f (x)dx. Now, we introduce the notation of pdfs of continuous random variables on the real probability space. Definition 1. A pdf is a function f : R −→ R such that 1. f (x) ≥ 0 for every x ∈ R. 2. Area[−∞,+∞] (f ) =

R∞ −∞

f (x)dx = 1.

It is apparent that the cdf of X is given by F (y) = P (X ≤ y) =

Ry −∞

f (x)dx; and f (y) =

Definition 2. The expected value of X is Z



µ = E(X) =

xf (x)dx. −∞

If the function g : R −→ R is such that Y = g(X) is a random variable, then we have Z



E(Y ) = E[g(X)] =

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

The variance of X is 2

Z



σ = V ar(X) = −∞

3

(x − µ)2 f (x)dx.

d F (y). dy

Example 1. What is the probability that a battery-powered watch will stop with its minute hand positioned between 10 and 20 minutes past the hour? Answer: Let X denote the number of minutes past the hour to which the minute hand points when the watch stops. The pdf that describes the notion of equally likely values in the interval [0, 60] is

   0, x ∈ (−∞, 0),    f (x) = 1/60, x ∈ [0, 60),      0, x ∈ [60, ∞).

1 = To check that f is a pdf, observe that f (x) ≥ 0 for every x ∈ R and that Area[ 0, 60)(f ) = (60−0) 60 1 = 1/6. 1. Thus, P (X ∈ (10, 20)) = Area(10,20) (f ) = (20 − 10) 60

Example 2. Consider two battery-powered watches. Let X1 denote the number of minutes past the hour at which the first watch stops and let X2 denote the number of minutes past the hour at which the second watch stops. What is the probability that the larger of X1 and X2 will be between 30 and 50? Answer: Here we have two independent variables, each uniformly distributed – Uniform[0,60), and a third random number Y = max(X1 , X2 ). Let F denote the cdf of Y . We want to calculate P (30 < Y < 50) = F (50) − F (30). By the independence of X1 and X2 , we have

F (y) = P (Y ≤ y) = P ((X1 ≤ y) ∩ (X2 ≤ y)) = P (X1 ≤ y)P (X2 ≤ y) =

y2 . 602

Hence, P (30 < Y < 50) = 4/9.

4

Normal Random Variable

This is the most important family of distributions in probability or statistics. Definition 3. A continuous random variable X is normally distributed with mean µ and variance

4

σ 2 > 0, denoted X ∼ N (µ, σ 2 ), if the pdf of X is  1 1 f (x) = √ exp − 2 2πσ



x−µ σ

2

 .

Here are useful properties of the normal random variables. 1. f (x) > 0 and X(S) = (−∞, ∞). 2. f is symmetric about µ, i.e., f (µ + x) = f (µ − x). 3. f (x) decreases as |x − µ| increases. In fact, the decrease is very rapid. We express this by saying that f has very light tails. 4. P (µ − σ < X < µ + σ) = 0.683. 5. P (µ − 3σ < X < µ + 3σ) = 0.997. Definition 4. The standard normal distribution is N (0, 1). The pdf is often written as Φ(x); and the values of Φ(x) for every x ∈ R are given in formal statistical tables. If X ∼ N (µ, σ 2 ), then Z =

X−µ σ

∼ N (0, 1).

Example 3. If X ∼ N (2, 16), then the probability that X assumes a value between 0 and 10 is < P (0 < X < 10) = P ( 0−µ σ

X−µ σ


3,

where c is an undetermined constant. (a) For what value of c is f a probability density function? (b) Suppose that a continuous random variable X has probability density function f . Compute E(X). 8

(c) Compute P (X > 2). (d) Suppose that Y ∼ Uniform(0, 3). Which random variable has the larger variance, X or Y? (e) Determine and graph the cdf of X. 4. Imagine that you are throwing at a circular dart board, B. Let us measure the dart board in units for which the radius of B is 1, so that the area of B is π. Suppose that the darts are thrown in such a way that they are certain to hit a point in B, and that each point in B is equally likely to be hit. Thus, if A ⊂ B, then the probability of hitting a point in A is P (A) =

area(A) area(B)

=

area(A) . π

Define the random variable X to be the distance from the center of

B to the point that is hit. (a) What are the possible values of X? (b) Compute P (X ≤ 0.5). (c) Compute P (0.5 < X ≤ 0.7). (d) Determine and graph the cdf of X.

9