Lect8 PDF
Lect8 PDF
Introduction to random variables Probability distribution function (pdf), Cumulative distribution function (cdf),
Definitions
Random variables (X) - function that assigns a numerical value to each simple event Probability Distribution Function
in a sample (eg: X, Y etc)
- ‘random’ indicates that X is determined by chance
Discrete probability distribution - list of all the possible values of random variable
(associated with probability)
X with their corresponding probabilities.
x 0 1 1 2
Therefore, x =
The probability distribution can be presented in the forms of Cumulative Distribution Function
(a) table
(b) piecewise function Cumulative distribution function of X, denoted by F x , is given by
(c) graph
F ( xn ) P( X xn )
mode = value of x that has the highest probability, P( X x) xn
to find probability = refer to the probability distribution table P( X x) P X x1 P X x2 .... P X xn
x x1
Example 2
Construct the probability distribution function, if two fair coins are tossed. Let X represents Median, m - value when (a) P X m 0.5 (using pdf)
the number of tail obtained. Then, sketch the graph of probability distribution function. (b) F m 0.5 (using cdf)
Solution
Example 6
The probability distribution function of a discrete random variable X is given in the table
below.
x 0 1 2 3
1 3 3 1
P X x
8 8 8 8
Solution
Methods to find probability from cumulative distribution function: Expectation of X (Discrete Random Variable)
(a) use cumulative distribution function formula
(b) convert cumulative distribution function to probability distribution function Expectation (or expected value or mean or average ) = or E(X).
F a F a 1
all x
3. Eg X g x P X x .
all x
2. Standard deviation =
Properties of variance
Note: The above properties of variance are true for both discrete and continuous random
variables.
1. If X is a continuous random variable with probability density function f ( x ) , then Cumulative distribution function for a continuous random variable X with probability density
b function, f ( x ) is a function F ( x ) where
P(a X b) f ( x)dx .
a
y x
y = f (x) F ( x) P( X x) f (t )dt
Notice that the link with the formula for the discrete random variables, P(X=x) is replaced by
P (a x b) f (x ) and Σ by .
x Notes:
0 a b 1. F ( x ) is in fact given by the area under the curve y = f (x ) from -∞ up to x as
b
Notice that f ( x)dx is in fact the area enclosed by the curve y f (x ) , x-axis, the indicated by the shaded region.
a
Unlike discrete distribution, we do not need to worry about inequalities. 2. F (-∞) = 0 and F(∞) =1
a 3. P ( X< a) = P( X ≤ a ) = F(a)
3. P X a P X a f ( x)dx
4. P( X a ) P( X a ) 1 F (a )
4. P X a P X a f ( x)dx
a 5. P(a≤X≤b) =P(a<X≤b)
=P(a≤X<b)
5. mode = value of x that has the highest f(x) (from the pdf graph) =P(a<X<b)
= F (b) – F (a)
6. The probability density function can be presented in the forms of
(a) piecewise function
(b) graph
6. median = middle value (exactly half the data lying below that value and half lying above Example 6
that value).
X is a continuous random variable with probability density function
In the context of a probability density function, the median will be that point below
which the area is 0.5 and above which the area is also 0.5 . ax , 0 x 1
1
In other words, the median divides the area under the curve into halves.
f ( x) a 3 x , 1 x 3
2
If the median is m, then 0 , otherwise
m Find (a) the value of a.
(a) P(X m) = f ( x)dx 0.5 (using pdf)
(b) F ( x ) .
(b) F (m) = 0.5 (using cdf) Solution
y
y = f (x)
a m x
b
Example 4
1
X is a continuous random variable with probability density function f (x ) = x,
8
where 0 ≤ x ≤ 4.
(a) Find the cumulative distribution function, F(x).
(b) Sketch the graphs of F ( x ) and f ( x ) .
(c) Calculate P(2 < X < 3) .
(d) Find the median of F ( x ) and mode.
Solution
Finding the probability density function from a cumulative distribution function and vice Expectation of X (Continuous Random Variable)
versa
Expectation (or expected value or mean or average) = or E(X).
x
F ( x) f (t)dt 1.
E ( X ) xf ( x) dx
integrate
2.
E X 2 x 2 f ( x)dx
3.
differentiate
d
f ( x) F ( x) Properties of expectation
dx
1. E(a) = a, where a is constant.
2. E(aX) = a E(X), where a is a constant.
Example 7 3. E(aX b) = a E(X) b, where a and b are constants.
2. Standard deviation =
Standard deviation of X = Var ( X )
Properties of variance
Note: The above properties of variance are true for both discrete and continuous random
variables.
Example 10
X is a continuous random variable with probability density function f(x).
x f ( x)dx 29 and
2
If Var (3X) = 36 ,
Solution