Random Variables

Example 1| Example 2 | Example 2.1-4 | Useful Web Resources| Solutions

 

Random Variables

A random variable can be thought of as a function that maps the points of the sample space into the set of real numbers.

Continuous Random Variable:

A continuous random variable is one in which the probability is spread continuously over intervals of real numbers. Eg height, weight, time etc.

Discrete Random Variable:

A discrete random variable is one which the possible values are countable. Its probability is concentrated on a finite or countably infinite set of real numbers. Eg the random variable representing the number of people with black hair in a group of 20, has probability concentrated on the points 0,1,2,..., 20.

Definition 2.1-1:Probability Mass Function

The probability mass function of a discrete random variable X is the function that assigns a probability to each of the possible values of X. The probability mass function X is denoted as p(x) and is defined by p(x) = P (X=x) .

 

Example 1:

Consider rolling a dice 3 times. Let the random variable X denote the number times the dice rolls a 2. The probability mass function p(x) is given below.

x
p(x)
0
(5/6)(5/6)(5/6)=125/216
1
(5/6)(5/6)(1/6)+(5/6)(1/6)(5/6)+(1/6)(5/6)(5/6)=75/216
2
(5/6)(1/6)(1/6)+(1/6)(5/6)(1/6)+(1/6)(1/6)(5/6)=15/216
3
(1/6)(1/6)(1/6)=1/216

The corresponding histogram:

Properties of Probability Mass Functions

We can use Example 1 to show that these properties hold.

i)

  • 0 £ p(0)=125/216 £1
  • 0 £ p(1)=75/216 £1
  • 0 £ p(2)=15/216 £1
  • 0 £ p(3)=1/216 £1

ii) p(0) + p(1) + p(2) + p(3) = (125+75+15+1) / 216= 216 / 216=1

Definition 2.1-2: Cumulative Distribution Function (CDF)

For each real number x, the function F(X)= P(X £ x ) is called the cumulative distribution function of X. F(x) is probability that X is less than or equal to x.

For example, if X has a probability mass function P(X = x) then F(x) = P(X £ x) = SP(X = x). So for each value of X that is less than or equal to x, find the probability of X at that value and sum up the results.

 

Example 2:

Lets consider Example 1 again. F(x) for x=0,1,2 and 3 are:

F(0)
P(X £ 0)= P( zero or fewer 2's)= 125/216
F(1)
P(X £ 1)= P( One or fewer 2's)=(125+216)+(75/216) =200/216
F(2)
P(X £ 2)= P( Two or fewer 2's) =(125+216)+(75/216)+(15/216)=215/216
F(3)
P(X £ 3)= P(Three or fewer 2's) =(125+216)+(75/216)+(15/216)=216/216

 

It is possible to compute F(x) for values of x not equal to 0,1,2, or 3. Although p(2.5)=0,

F(2.5)=P(X £ 2.5)=P(2.5 or fewer 2's)

=p(0)+p(1)+p(2)

=125/216 +75/216 + 15/216

=215/216

The cumulative distribution function in the discrete case is a step function. The size of the step at x is equal to the probability mass function p(x).

The size of the step at x =1 is 200/216 -125/216 = 75/216 = p(1)

What is the size of the step for x =2?

(Round to 3 decimal places)

What is the size of the step for x=3?

(Round to 3 decimal places)

Solution

Exercise 2.1-4

A multiple choice test has three possible answers for each question, one of which is correct. Let X denote the number of correct answers in an exam consisting of four questions. Find the probability mass function of X and the cumulative distribution of X, assuming the student guesses on each question.

Solution

Free JavaScripts provided by The JavaScript Source

 


Useful Web Resources

Random Variables and Statistics

Random Variables and Distributions

Math Revision: Discrete Random Variables

 


 

Solutions

 

Solution to Example 2

The size of the step at x =2 is 125/216 -200/216= 15/216 = p(2) =0.069

The size of the step at x=3 is 216/216-215/216= 1/216 = p(3)=0.004629=0.005

Solution to Multiple Choice

x P(x) F(x)
0 16/81
1 =32/81
48/81
2 6(1/3)^2(2/3)^2=24/81 72/81
3 =8/81
80/81
4 (1/3)^4=1/81 1

6) P(X>2) = 1-P(X £ 2)=1-(72/81)=9/817) P(0<X<3)= 32/81 + 24/81 = 56/81 because 0 and 3 are not included in the range.

8) P(1 £ X £ 3)=32/81+24/81+8/81=64/81 because 1 and 3 are included in the range

 

Created by Ranodya Upathilake © Copyright 2002-2003. All rights reserved. Free Web Site Templates by JimWorld.com Designed by Finerdesign.com | Comments or Questions?