100% found this document useful (1 vote)
1K views15 pages

Chapter Two 2. Random Variables and Probability Distributions

This document provides an overview of random variables and probability distributions. It defines random variables as variables whose values depend on the outcome of a random experiment. Random variables can be either discrete or continuous. Probability distributions describe how probabilities are distributed among the possible values of a random variable. For discrete random variables, this is represented by a probability mass function, while for continuous random variables it is represented by a probability density function. The document provides examples of calculating probability distributions and cumulative distribution functions for discrete random variables from sample experiments like coin tosses and die rolls. It also provides an example of calculating a probability using the probability density function for a continuous random variable.

Uploaded by

abdihalim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
1K views15 pages

Chapter Two 2. Random Variables and Probability Distributions

This document provides an overview of random variables and probability distributions. It defines random variables as variables whose values depend on the outcome of a random experiment. Random variables can be either discrete or continuous. Probability distributions describe how probabilities are distributed among the possible values of a random variable. For discrete random variables, this is represented by a probability mass function, while for continuous random variables it is represented by a probability density function. The document provides examples of calculating probability distributions and cumulative distribution functions for discrete random variables from sample experiments like coin tosses and die rolls. It also provides an example of calculating a probability using the probability density function for a continuous random variable.

Uploaded by

abdihalim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Statistics for Economists JJU, Department of Economics

Chapter Two
2. Random Variables and Probability Distributions

2.1. Concepts of Random Variables

Definition: A variable whose numerical value is determined by the outcome (or result) of a
random experiment is called a random variable or a chance variable. A random variable X
can also be regarded as a real-valued function defined on the sample space S of a random
experiment such that for each point X of the sample space, f(X) is the probability of
occurrence of the event represented by X. or

-is a numerical description of the outcome of an experiment.

-the value of the random variable is not known until the experiment outcome is observed

Random variable can be either Discrete or Continuous depending on the numerical value it
assumes.

 Discrete Random Variables: - are random variables that may assume either a
finite whole number of values or an infinite sequence of whole numbers such as 0,
1, and 2…is referred to as a discrete random variable.
 Continuous Random Variables: - are variables that assume any numerical value
in an interval or collection of intervals

Experimental outcomes that are based on measurement scales such as time,


weight, distance and temperature can be described by continuous random
variables.

Probability Distribution: - the probability distribution for a random variable describes how
probabilities are distributed over the values of the random variable.

2.2. Probability Distributions and Densities

2.2.1. Probability Distributions

If a random variable X assumes the discrete set of values x 1, x2, …, xn, then the function f
defined by f(xi) = P(X = xi) – probability that X assumes the value say xi = p(xi) – is called
probability function (or density function) and P(X = xi) is called the probability of xi . The
list of pairs of values xi and P(xi) is called the probability distribution of X.

The probability distribution of n discrete variable X must satisfy two conditions:

1
Statistics for Economists JJU, Department of Economics

1. 0 ≤ P ( x i ≤ 1)
n
2. ∑ P( x¿¿ i)=1 ¿
i=1

Example1: Suppose we tossed a fair coin three times successively. What are the values of X
(xi) and its corresponding probability, where xi shows the number of heads?

Solution: The sample Space, S = {HHH, HHT, HTH, THH, TTH, THT, HTT, TTT}.

Then xi 0 1 2 3
f (xi) 1/8 3/8 3/8 1/8

Example 2: Suppose that a fair die is thrown once. The outcomes are number of dots. What
are the values of xi and its corresponding probability distribution?

Let x be a random variable that represents the number of dots of the die

And P (x) then

xi 1 2 3 4 5 6
f (xi) 1/6 1/6 1/6 1/6 1/6 1/6

2.2.2. Cumulative Distribution Function (Discrete Random Variable)

If x1, x2, x3, … xn are different values of X given in increasing order then the cumulative
probability of the first K values is given by:
k
P( X < x k )=F ( x k )=∑ f (x i)
i=1

 f (x i) is the probability distribution of xi and F ( x k ) is cumulative distribution function


of X.
 If X takes on only a finite number of values x 1, x2,....,xn then the distribution function
is given by

2
Statistics for Economists JJU, Department of Economics

0 ,    x  x1
 f (x ) , x1  x  x2
 1

 f ( x1 )  f ( x2 ) , x2  x  x3
F ( x)  
.
.

 f ( x1 )  ...  f ( xn ) , xn  x  

Properties of F(X): The values F(X) of the distribution function of a discrete random
variable X satisfy the conditions:
 F(-∞ ) = 0 and F(∞ ) =1;
 If a <b, then F(a) ¿ F(b) for any real numbers a and b
Example: Consider tossing of a coin three times successively.
a) Obtain the probability of distribution of a random variable X, where X represents
the number of heads
b) Obtain the cumulative distribution function for the random variable X
Solution:
a) S = {HHH, HHT, HTH, THH, TTH, THT, HTT, TTT}
Then; the probability distribution of getting heads is given by:

Xi 0 1 2 3
f (xi) 1/8 3/8 3/8 1/8

b) Now, the cumulative distribution function of the random variable x is given


by:
F(0)=f(0)=1/8
F(1)=f(0)+f(1)=1/8+3/8=4/8
F(2)=f(0)+f(1)+f(2)=F(1)+f(2)=4/8+3/8=7/8
F(3)=f(0)+f(1)+f(2)+f(3)=F(2)+f(3)=7/8+1/8=1
We can write this in an alternative fashion as

3
Statistics for Economists JJU, Department of Economics

0 , for x <0

{
1
for 0 ≤ x <1
8
F ( x )= 4 , for 1 ≤ x <2
8
7
, for 2≤ x <3
8
1 , for x ≥ 3

Example3: Consider tossing a coin four times.


a) Write the sample space
b) Obtain the probability distribution of getting a head
c) Obtain the distribution function of getting a head
Solution:
a) S=
{HHHH , HHHT , HHTH , H THH , HHTT , HTHT , HTTH , HTTT ,THHH , THHT , THTH ,
TTHH , THTT , TTHT ,TTTH ,TTTT }
b) The probability distribution of the random variable X, where X is the number of
getting head in tossing of a coin four times.
Number of Heads (X) Probability, f(xi)
0 1/16
1 4/16
2 6/16
3 4/16
4 1/16

c) F(0)=f(0)=1/16
F(1)=f(0)+f(1)=1/16+4/16=5/16
F(2)=f(0)+f(1)+f(2)=F(1)+f(2)=5/16+6/16=11/16
F(3)= f(0)+f(1)+f(2)+f(3)=F(2)+f(3)=11/16+4/16=15/16
F(4)= f(0)+f(1)+f(2)+f(3)+f(4)=F(3)+f(4)=15/16+1/16=1
Alternatively;

4
Statistics for Economists JJU, Department of Economics

0 , for x <0

{
1
for 0 ≤ x<1
16
5
, for 1 ≤ x <2
F ( x )= 16
11
, for 2 ≤ x <3
16
15
, for 3≤ x <4
16
1 , for x ≥ 4

2.2.2. Continuous Random Variables and Probability Density Functions


A random variable X is said to be continuous if it can assume any value on the real line. More
formally, a random variable X is said to be continuous if there exists a function f called
probability density function (pdf) which satisfies:
 f ( x ) ≥0 , for all x

 ∫ f ( x ) dx=1
−∞

x2

 If x1<x2, we have P(x 1 ≤ x ≤ x 2 ¿=∫ f (x ) dx


x1

Example4: The probability density function (pdf) of a continuous random variable X is given
by:

f ( x )= 2 x , 0 ≤ x ≤ 1
{0 , elsewhere

a) What is the probability that X will be smaller than or equals to 1


1 1
b) What is the probability that x takes on ≤ x≤
3 2
Solution:
1
a) P (0 ≤ x ≤ 1)=∫ ( 2 x ) dx=1 [ x ] =1
2

0 0

5
Statistics for Economists JJU, Department of Economics

1
2
1
2 2
1 1 2 [ x2 ]= 1 − 1 = 5
b) P (
3
≤ x ≤ )=∫
2 1
( 2 x ) dx=
1 () ()
2 3 36
3
3

Example5: A probability density function (pdf) of a continuous random variable X is


given by
−x
f ( x )= x e , x ≤ x ≤∞
{ 0 , elsewhere

Find the probability that 1 ≤ x ≤2 i.e. P(1 ≤ x ≤2)

2
−x
Solution: P(1 ≤ x ≤2)=∫ (x e )dx, using the integration by parts and
1

Let u=x and dv=e− x, then du=1 and v=-e− x

2 2
−x −x 2
Then ∫ (x e )dx=-xe -∫ (−e )dx= [-xe −e ¿
−x −x −x

1 1
1

= [-2e−2−e−2 ¿−[ −e−1−e−1 ]=−2 e−2−e−2 + e−1 +e−1


=−3 e−2 +2 e−1
= -0.40600+0.73575
=0.32975
Cumulative Density Function (CDF) For Continuous random Variable
For a continuous random variable X the CDF of f (X), probability that X will assume any
value less than or equal to Xk is given by:
XK

P (X 1 ≤ X ≤ X K ¿=∫ f (x )dx
−∞

Properties of Cumulative density function


 0 ≤ f ( x )≤ 1
 If X1<X2, f (X ¿¿ 1)< f ( X 2) ¿
 If X1<X2, then the P( X 1 < X ≤ X 2 ¿=f ( X ¿¿ 2)−f ( X 1) ¿
lim f (x)=0 and lim f (x)=1
 x→−∞ x→ ∞

Example 6: Obtain the CDF if the PDF is given as

f ( x )= 2 x , 0 ≤ x ≤ 1
{ 0 , elsewhere

6
Statistics for Economists JJU, Department of Economics

x
2
F(x) =∫ (2 x ) dx=x
0

Thus,
0 , for x< 0

{
F ( x )= x 2 , 0 ≤ x ≤1
1 , for x> 1
Example7: (a) Find the constant C such that the function

f (x)=¿ {cx 2 0<x<3 ¿ ¿¿¿ is a density function and

(b) Compute P(1< x<2)


Solution:

(a) Since f (x) satisfies property, (1) if c ¿ 0, it must satisfy property 2 in order to be a density
function. Now
∞ 3
1
∫ f (x )dx=1⇒∫ cx 2 dx=1⇒ 9 c=1⇒ c=
−∞ 0 9
2
1 7
P(1< x<2)=∫ x 2 dx =
(b) 1 9 27

In case f(x) is continuous, which we shall assume unless otherwise stated, the probability that X is
equal to any particular value is zero. In such case we can replace either or both of the signs < by ¿

thus
7
P( 1≤X ≤2)=P( 1≤X <2 )=P(1< X ≤2)=P( 1< X <2)=
27

Example 8: The distribution function for a random variable X is

F(x) = ¿ {1 − e−2x x≥0 ¿ ¿¿ ¿


¿
Find (a) the density function, (b) the probability that X>2, and (c) the probability that -3 < X < 4.
Solution:
d
(a) f ( x) = F ( x ) = 2 e−2 x x> 0
dx
∞ ¿
l

(b) P( X >2) =
∫ ¿ 2e
2
−2 u
du=−e −2u
2
−4
= e

Another method

7
Statistics for Economists JJU, Department of Economics

By definition, P (X < 2) = F(2) = 1 - e-4. Hence,


P (X > 2) = 1 – (1 – e-4) = e-4
4 0 4

(c) P (−3<X ¿ 4 ) =
¿
∫ ¿ f (u)du =
−3
∫ ∫
¿ 0du +
−3
¿ 2e−2u du ¿
0
= −e−2u ¿ 40 = 1−e−8 ¿

Another method
P(-3 < X < 4) = P(X < 4) - P(X < -3)
= F(4) – F(-3)
= (1 - e-8) – (0) = 1 – e-8
Exercise
1. Check that the following function represents the PDF
2
f ( x )= 3 x , 0 ≤ x ≤1
{
0 ,elsewhere
2. Find the value of K for which f (x) is a valid PDF
2
f ( x )= k x ,0 ≤ x ≤ 2
{
0 , elsewhere
2.3. Expected value and Variance of Random Variable
2.3.1. Expected Value of Random variable
The mean of a probability distribution is a measure of its centrality or location, as is the mean
or average of a frequency distribution. It is a weighted average, with the values of the
random variable weighted by their probabilities. The mean is also known as the expected
value (or expectation) of a random variable, because it is the value that is expected to occur,
on average.
The expected value of a discrete random variable X is equal to the sum of each value of the
random variable multiplied by its probability.
  E ( X )   xiP ( xi )
all x

Properties of mathematical expectations


a. If C is a constant E(C) = C

b. E(aX+b) = aE(X)+b, where a and b are constants in ℜ


Proof:

8
Statistics for Economists JJU, Department of Economics

E (aX  b)   (ax  b) f ( x)
  axf ( x)   bf ( x)
 a  xf ( x)  b f ( x)
 aE ( x)  b, ( f ( x)  1)
c) The mathematical expectation of the sum of two or more random variables is
equal to the sum of the expectations of individual random variables
i.e. E ( X + Y ) = E ( X ) + E ( Y )
d) If X and Y are independent random variables, then E (XY) = E(X)* E (Y)
Note: E (XY) ≠E (X). E (Y) for dependent random variables
e) The expected value of the ratio of two random variables is not equal to the ratio
of the expected value of their random variables
X E (X )
E( )≠
Y E(Y )
Example7: Suppose a random variable X has the following distribution, what is the expected
value of X?

xi 2 4 6 8
f(xi) 0.1 0.2 0.3 0.4

Solution:
E (x)     xif (xi)
= 2(0:1) + 4(0:2) + 6(0:3) + 8(0:4) = 6
Example8: A real-estate agent sells 0, 1, or 2 houses each working week with
respective probabilities 0.5, 0.3, and 0.2. Compute the expected value of the number of
houses sold per week?

Solution:
E (x)     xif (xi)
= 0(0:5) + 1(0:3) + 2(0:2) = 0.7
Definition
The expectation E(X) for a continuous random variable X is defined by the following integral
when it exists:

9
Statistics for Economists JJU, Department of Economics


E ( X ) =μx =∫ xf ( x)dx
−∞

Example9: let X be a continuous random variable with the following pdf


1
f ( x )= 2
{
x , for 0 ≤ x ≤2
0 elsewhere
Obtain the expected value of X
Solution

E ( X ) =μx =∫ xf ( x ) dx
−∞

2 2
1 1 x3 2 4
μx=∫ x ( x)dx=∫ x 2=
0 2 0 2
=
6 0 3 { }
Example10: Consider the following function
−3 x
f ( x )= k e for x> 0
{
0 elsewhere
Obtain the expected value of the random variable X
Solution: First determine the value of K
∞ ∞

∫ xf ( x ) dx=∫ k e−3 x dx=1


−∞ 0

¿¿
1
¿ =1 , k=3
3k
Thus,

−3 x
f ( x )= 3 e for x >0
{
0 elsewhere

Now, the expected value can be obtained using the usual formula
∞ ∞
E ( X ) =μx =∫ xf ( x ) dx=∫ x ( 3 e−3 x ) dx=¿
−∞ 0

−3 x −3 x 3 −3 x t
¿ lim ( ¿ e − e ) =lim ¿ ¿ ¿
t→∞ 3 9 0 t→∞
1
E ( X )=
3
Exercise

10
Statistics for Economists JJU, Department of Economics

1. The probability of a business will get a profit of $20,000 is 0.2 and the probability of
making a loss of $1000 will be 0.8. Should the firm invest his money or not?
2. One hundred lottery tickets are sold each at one birr. Suppose prize-1 is 50 birr, prize-
2 is 20 birr and prize-3 is 10 birr. The chance of getting:
 50 birr is 0.01,
 20 birr is 0.01,
 10 birr is 0.01, and
 No birr is 0.97.
Then what will be the expectation this lottery game?

Expected value of a function of a random variable

Theorem: Let X be a discrete random variable with probability mass function p(x) and g(X)
be a real valued function of X. Then the expected value of g(X) is given by
Eg ( X )=∑ g ( x) P( x)
x
And if X is a continuous random variable with probability density function f(x) and g(x) a
real valued function of X. then, thee expected value of g(x) is given by

E [g ( X ) ]=∫ g (x) f (x )dx
−∞
Example11: What is the expected value of g(X) = 2 + 3X, where X is a random variable
obtained by rolling a die?
1
f ( x )=P ( X =x )= 6

E(aX + b) = aE(X) + b
{ , for x=1,2,3,4,5,6
0 , otherwise

1∗1 2∗1 3∗1 4∗1 5∗1 21


And E(X)= + + + + =
6 6 6 6 6 6
=E(g(x))=2+3E(X)=2+3(3.5)=12.5

11
Statistics for Economists JJU, Department of Economics

2.3.2. Variance of Random Variable


The variance measures that how individual values are speeded, dispersed or distributed
around its mean or expected value.
The variance of a random variable X, denoted by δ 2(x), is the expectedvalue of the squared
deviations of the random variable from its expected value.
Definition: If X is a discrete random variable with mean E(X) = μ, then the variance of a
random variable X is defined to be the expected value of
( X −μ ,)2 . That is:
2 2
δ =E {[ X−E ( X )] }
= E [ ( X −μ )2 ]
¿ ∑ ( X −μ )2 f ( x )
x

Alternatively, we can calculate


2
Var (x) = E ( X 2) −[ E ( X ) ]

¿ E ( X 2 ) −μ2
¿ ∑ X 2 f ( x )−¿ μ2 ¿
x

The standard deviation of X, δ, is the positive square root ofδ 2.


δ=√ var (x )

12
Statistics for Economists JJU, Department of Economics

Example12:Mr.Tujar buys a stock whose return (including both dividends and change in
price of stock) depends on whether the nation’s GNP is rising, constant, or falling. If the GNP
is rising, the return is 20 percent (i.e., 20 cents per Birr); if it is constant, the return is 5
percent; and if it is falling, the return is -10 percent. If he believes that it is equally likely that
the GNP will rise, remain constant, or fall. What is the expected value of the return from this
stock? And what are the variance and standard deviation of this stock’s return.

Solution: If it is equally likely that the GNP will rise, remain constant or fall, the probability
of each of these outcomes must equal 1/3. Thus, the expected value is:
3
E ( X ) =∑ xiP( xi)=20 (1/3)+5 (1/3)+−10 (1/3)=5 percent
i=1

2 2∗1 2∗1 2∗1 450


And Var(x)=∑ ( X−μ ) f ( x )=( 20−5 ) + ( 5−5 ) + (−10−5 ) =
x 3 3 3 3
¿ 150
S.D. of X or δx=√ δ 2=√150=12.5
Definition: If X is a continuous random variable with mean E(X) = μ, then the variance of a
random variable X is defined by

   x    x    f ( x ) dx
2 2



Example 13: Let x be a continues random variable with

1
f (x)=¿ { 4
2≤x≤6 ¿ ¿¿¿

Find the expected value and variance

Solution:

 6
x x 2 6 36 4
E ( x)  x f ( x)   dx  [ ]   4

2 4 8 2 8 8

 x  4
 6 2
4
  E  ( x   )  x  
2 2 2
x
  f ( x) dx   dx 
 2 4 3

Exercise:Find the expected value, variance & standard deviation of

13
Statistics for Economists JJU, Department of Economics

1
{
f (x)= ¿ x 0<x<2 ¿ ¿¿
2
Check Point

4
E( X )=
Mean = 3

2  2 2 2
 4   4  4 1
 2
2
 E ( x  )     x   f ( x ) dx    x   xdx 
 3    3 0 3 2 9
2 2
 
9 3
Properties of Variance

1. The variance of the product of a constant and a random variable x is equal to the
constant squared times the variance of the random variable x. That is, Var(cx) =
c2var(X)
2. The variance of the sum (or difference) of two independent random variables equals
the sum of their individual variances. That is , Var (x ± y) = Var(x) ± Var(y)
3. If x and y are independent random variables

2 22
var(x+y)=var(x)+var(y) or δ =δ +δ ¿
x+y x y
var(x−y)=var(x)+var(y)or δ2x−y =δ2x +δ2y ¿ ¿¿¿¿¿
Moments

A moment of a random variable X is defined as the expected value of some particular


function of X. In general, the moments of a probability distribution amount to a collection of
descriptive measures that can be used to characterize the location and shape of the
distribution. Hence, a probability distribution can be completely specified in terms of its
moments. As we shall now see, moments of a random variable typically are defined in terms
of having either zero or the expectation of X as the reference point.

A) Moments around the origin

For X a discrete random variable, the rth moment about the origin is defined as:

14
Statistics for Economists JJU, Department of Economics

x
r
μr =E( X r ) i
f ( xi )
= i

The zero moment about the origin is μ0=E ( X 0 )=1

The first moment about the origin is μ1=E ( X 1 )=μ

(Note that the first moment about zero is the mean of X or μ = E( X )=μ )
r

B) Moments around the mean

The rth moment about the mean of X is defined as


r
μ = E [( X −μ ) ]=∑ ( x −μ ) f ( x )
r
r
i
i i

If X is a continuous random variable with probability density f(x), then, provided the
following integrals exist, we may correspondingly define


μr  E ( X ')   x f ( x )dx;
r

The rth moment around the origin

And

μ = E [( X −μ ) ]=∫
r
r +∞
−∞
( x−μ )r f ( x )dx ; the rth moment around the mean

It is easily verified that:

a) The zero central moment of X is one (µ0=E(X-µ)0=E(1)=1)


b) The first central moment of X is zero (µ1=E(x- µ)=E(X)- µ = 0)
c) The second central moment of X is the variance of X or µ 2 = [E(x- µ)2]=V(X)
The first moment about zero locates the mean or measures central tendency of a probability
distribution and the second moment about the mean describes its shape in terms of variation
or dispersion about the mean. Additional information about the shape of a probability
distribution, as characterized by measures of skewness and kurtosis, are provided by the third
and fourth central moments of X, respectively. In particular, we shall develop standardized
(independent of units and taken relative to) measures of skewness and kurtosis.

15

You might also like