0% found this document useful (0 votes)
128 views

Uperior Niversity Ahore: (D O S E)

1. The document discusses random variables and discrete probability distributions. It defines random variables and describes how they can take discrete or continuous values. 2. Discrete random variables can only take on certain specific values from a set like {0, 1, 2}, while continuous random variables can take any value within a range. 3. The probability distribution of a discrete random variable is specified by listing the possible values and their probabilities, such as P(X=0)=1/3, P(X=1)=1/2, P(X=2)=1/6. The probabilities must sum to 1.

Uploaded by

atta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views

Uperior Niversity Ahore: (D O S E)

1. The document discusses random variables and discrete probability distributions. It defines random variables and describes how they can take discrete or continuous values. 2. Discrete random variables can only take on certain specific values from a set like {0, 1, 2}, while continuous random variables can take any value within a range. 3. The probability distribution of a discrete random variable is specified by listing the possible values and their probabilities, such as P(X=0)=1/3, P(X=1)=1/2, P(X=2)=1/6. The probabilities must sum to 1.

Uploaded by

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

SUPERIOR UNIVERSITY, LAHORE

(DEPARTMENT OF SOFTWARE ENGINEERING)


COURSE: PROBABILITY STATISTICS
INSTRUCTOR: DR. MUHAMMAD RASHAD YOUNUS
LECTURE: RADOM VARIABLE SEMESTER: SPRING 2021
Random Numbers  Repeatedly drawing numbered slips out
Random numbers are the numbers obtained by of a box.
some random process. These numbers are Types of Random Variable
assumed to be randomly and uniformly There are following two types of random
distributed. The basic random numbers are the variable
ten one-digit numbers 0 to 9, has an equal  Discrete Random Variable
chance of occurring.  Continuous Random Variable
Random Variable Discrete Random Variable
The numerical quantity whose values are A random variable X is called discrete if it can
determined by the outcome of random assume finite (or) countably infinite number of
experiment is called random variable. (OR) values. e.g.
Any characteristic of interest defined on the 1) If two bulbs are selected from a certain lot,
outcomes of a random experiment and assumes the number of defective bulbs may be 0, 1,
any numerical value against every possible or 2. The range of the variable is from 0 to 2
outcome is called random variable. and random variable can take some
Note selected values in this range.
A random variable is also called a chance 2) The number of defective bulbs cannot be
variable or stochastic variable. 1.1 (or) –1 (or) 3 etc.
Random variables are denoted by capital letters 3) This random variable can take only the
X, Y, Z and their values are denoted by small specific values which are 0, 1 and 2.
letters x, y, z etc. When two dice are rolled the total on the two
e.g. When three coins are tossed then the dice will be 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, and 12.
possible sample space is The total on the two dice is discrete random
S = {HHH, HHT, HTH, HTT, THH, TTH, TTT} variable.
Let X denotes the number of heads then the Discrete Probability Distribution
values of X are 0, 1, 2, 3. If a discrete random variable X assume
How to generate the Random numbers? possible values are x1, x2, x3,…,xn with respective
Random numbers are generated manually as probabilities P(x1), P(x2), P(x3), …,P(xn), then an
well as mechanically. arrangement of all possible values of the
random variable X along with their probabilities
Manually: Random numbers can be generated
is called a probability distribution (or)
manually by drawing cards from numbered probability function of X.
cards or spinning numbered wheels. A probability distribution can be represented in
Mechanically: Random numbers can be a tabular form showing the above information.
generated mechanically by use of xi x1 x2 … xi xi+1 … xn
programmable calculators or digital computers.
Simple ways to generate the Random Variable P(xi) P(x1) P(x2) … P(xi) P(xi+1) … P(xn)
The simple way to generate random numbers is “The set of ordered pairs (x, P(x)) is called the
game of chances such as: probability function or probability distribution
 Tossing a coin of the discrete random variable X.”
 Throwing a dice or NOTE
We also use the notation f(x) for the probability The probability distribution can be presented in
that the r.v. takes on the value x; i.e. the form of probability histogram.
f(x) = P(X = x).
P(xi)
The probability of some interval can be
calculated by adding the probabilities of all the
points in the interval. e.g.
P  x1  X  x4  = P  X  x2  + P  X  x3 
P  x1  X  x4  = P  X  x1  + P  X  x2  + P  X  x3 
+ P  X  x4 
P  X  x3  = P  X  x1  + P  X  x2 
P  X  x3  = P  X  x1  + P  X  x2  + P  X  x3 
Forms of Discrete Probability Distribution
There are two different forms of discrete
probability distribution:
 Equation form 0 x1 x2 x3 ... xi ... xn X
 Graphic form
Probability Function Properties of Discrete Probability Distribution
A discrete probability distribution (or) function
The probability distribution can be described in
the form of an equation for f(xi) with a list of f(xi) has the following properties:
possible values of the random variable. e.g.  f(x) or P(x) is always non-negative. i.e. P(x) > 0
1  P(x) lies between 0 and 1. i.e. 0 < P(x) < 1
For each value of X the probability is . That is
6  The sum of all the probabilities is 1.i.e.∑ P(xi) = 1
f  xi  =
1
for xi = 1, 2, 3, 4, 5, 6 
6 PRACTICE EXERCISE
It is the probability distribution when three fair 
1. Given x = 0, 1, 2 and P(x) = 5/8, 4/8, 1/8.
coins are tossed.
Is this probability distribution?
3
1 2. Given f  x  = x ; x = 1, 2, 3, 4. Show that
f  xi  = 3C x   for xi = 0,1,2,3 10
2
f  x  is a probability function.
f (xi) = P ( X = xi ) for i = 1, 2, …, n
3. Given f  x  = k ; x = 1, 2, 3, 4. Find the value
x
=0 X ≠ xi of k.
Graphic form of Discrete Probability
4. Given f  x  = k   ; x = 0, 1, 2, 3, 4. Find the
4
Distribution
The discrete probability distribution can be  x
presented in the form of a graph by taking the value of k.
values x1, x2, x3, …, xn on X-axis and drawing 5. Given x = −3, −2, 2, 3 and P(x) = c, 4c, 3c, 2c.
vertical lines of heights equal to P(x1), P(x2), Find P(X > −3).
P(x3),…, P(xn) above them. This type of graph is
6. Given x = −3, −1, 0, 1, 2, 5 and P(x) = 0.1, c,
called “line graph or bar diagram”.
0.2, 2c, 0.3, 3c. Find P(−1 ≤ X ≤ +1).
7. Given x = −1, 0, 1 and f  x  = 2 x  3 .
P( xi )
4
Whether this is a probability function or not?
8. A random variable X has the probability
distribution:
x 0 1 2 3 4 5 6 7 8
P(x) A 3a 5a 7a 9a 11a 13a 15a 17a
0 x1 x2 x3 . . . xi xi+1 . . . xn X (i) Determine the value of “a”
(ii) Find P(X < 2), P(X ≥ 6), P(3 < X < 5). 19. Determine the constant c so that the
9. A pair of fair dice is rolled. Let X represents following p.m.f. of the random variable Y is a
the sum of the outcomes on both the dice. valid probability mass function:
f(y) = c(1/4)y for y = 1, 2, 3, ...
Find the probability distribution of X.
20. The r.v. X has the following probability
10. A pair of fair dice is rolled. Let X represents
distribution:
the difference between the outcomes on
x 1 5 9
both the dice. Find the probability
P(x) a b C
distribution of X.
Where a, b & c are constants. It is known
11. A pair of fair dice is rolled. Let X represents
that P(X < 4) = P(X > 4) and P(X ≤ 5) = 2P(X >
the absolute difference between the
5). Find the values of a, b & c.
outcomes on both the dice. Find the
21. A discrete random variable X has the
probability distribution of X.
following probability function
12. If X has a probability function
k  x  1 for x = 2, 3, 4, 5
Cx 3

P X = x = , x = 0, 1, 2,3. f  x  = k  9  x  for x = 6, 7, 8
23 0
Find the probability distribution of X.  elsewhere
13. Show that following is the probability Find the value of the constant k and the
function. probability distribution of X. Determine (i)
4 4 x
P(X  5) (ii) P(X > 6) (iii) P(4 < X  7)
 2 1
f  x  = 4C x     , x = 0, 1, 2, 3, 4. Continuous Random Variable
 3  3 A random variable is called continuous if it can
assume all possible values in the possible range
14. Show that following is the probability
of the random variable.
function.
6
In case of continuous random variable there
C x 4 C4 x
f  x = 10
, x = 0, 1, 2, 3, 4. is an infinite number of values with in a given
C4 interval.
15. If X has a probability function e.g.
x 1  Height of a student which can be any value,
5 1
P  X = x  =     , x = 1, 2, 3, 4, 5, 6. say between 64inches and 65inches.
6 6  Weight of a person which can be any value,
Find the probability distribution of X. say between 60kg and 61kg.
16. A discrete random variable X has the  Temperature at a place which may be any
following probability distribution. value, say between 30oC and 31oC.
x –1 0 1 4  Speed of a car which may be any value, say
P(x) 0.2 0.5 A 0.1 between 50km and 51km etc.
i. Find the value of “a” ii. P(X = 0) iii. P(X > 0)  When we say that the temperature at a
iv. P(X ≥ 0) v. P(X ≤ – 2) place is 30oc, it means that the temperature
17. A discrete random variable X has the may take a value somewhere between
following probability distribution. 29.5oC and 30.5oC.
X –2 –1 0 1 2 3 NOTE
P(x) 0.1 K 0.2 2K 0.3 3K  Any observation which is taken falls in an
i. Find the value of “K” ii. P(X < 2) iii. P(X ≥ 2) interval.
iv. P( – 1 ≤ X ≤ 2)  There is nothing like an exact value in
18. Let f(x) = cx2 for x = 1, 2, 3. Determine the continuous random variable.
constant c so that the function f(x) satisfies  In discrete random variable the values of
the conditions of being a probability mass the variable are exact like 0, 1, 2 good
bulbs.
function.
In continuous random variable the value of the
variable is never an exact point. It is always in
the form of an interval, the interval may be very  As the probability is zero for X = c
very small. (constant), therefore
If there are two points a and b then the
 P(X = a) = P(X = b) = 0.
probability that the random variable
will take value between a and b is given by the  If we take an interval a to b, it make no
integral. difference whether end points of the
b
P (a < X < b) =  f(x) dx
a
interval are considered or not. Thus we can
write
b
P(a  X  b) = P(a < X < b) = P(a  X <
P (X < b) =  f(x) dx 
-
b) = P(a < X  b)

 P(X  b) = P(X < b)
P (X > a) =  f(x) dx
a  P(X  a) = P(X > a)
k Hieght × Base

P (X = k) =  f(x) dx = 0 i.e. the probability
k
Area =
2
Mathematically, we can write
that X is equal to any particular value is zero.
Where “a” and “b” are any points between - ∞  P(a < X < b) =
f(a) + f(b) × (b  a)
and + ∞. 2
The quantity f(x)dx is called probability 
differential. PRACTICE EXERCISE
Probability Density Function 
The probability function of a continuous 1. Find the constant c such that the function
random variable is called probability density cx 2 0<x<3
f (x) = 
function (or) briefly p. d. f. It is denoted by f(x.) 0 otherwise
f(x) is a density function, and (b) compute P(1 < X
< 2)
2. Let X be a continuous random variable whose
probability density function is:
f(x) = x3/4
for an interval 0 < x < c. What is the value of
the constant c that makes f(x) a valid
probability density function?
3. If a function is given as:
0 x x + x X 3  2x ; 2≤ x≤4
f (x) =
18
Where f(x) is the probability that the random (i) Show that it is a proper density function
variable X takes the value between x and x + ∆x. Find (ii) P(X ≥ 2.5) (iii) P(2 ≤ X ≤ 3) (iii) P(X <
Where ∆x is a very very small change in X. 3.5)
Properties of Probability Density Function 4. A continuous random variable X which
The probability density function f (x) must have assumes the values between X = 2 and X = 4
the following properties. has the density function given by
 f(x) is non-negative i.e. f(x) > 0 x+1 ; 2x4
f (x) =
8
 Total Area = ∫ f(x) dx = 1
(i) Show that P(2 < X < 4) = 1
 P(X = c) = ∫f(x)dx = 0 Where c is any (ii) P(2.4 < X < 3.5) = ? (iii) P(X < 3.5) = ?
constant.
5. A continuous random variable X which 12. A continuous random variable X that can
assumes the values between X = 2 and X = 5 assume values only between X = 2 and X = 8
has the density function given by: has a density function given by a(x + 3), where
2 1 + x  ‘a’ is a constant. Find
f (x) =
27 (i) the value of ‘a’. (ii) P(3 < X < 5) (iii) P(X ≥ 4)
Find (i) P(X < 4) (ii) P(3 < X < 4) 13. If f(x) = A (2x3 +1) , 0 ≤ x ≤ 2 and = 0
(iii) P(X > 3.5) elsewhere. Find (i) “A” (ii) P(X > 1.5) (iii) P(X
2 5  x  < 1.2) (iv) P(1 < X ≤ 2)
6. If f (x) = ; 0 < x < 5 then
25
14. A continuous random variable X has the
Show that it is a p.d.f. Also find P(X < 4), P(X following probability density function:
> 6) k x 2 for 0  x  a
f  x = 
7. A continuous random variable X has following 0 elsewhere
probability density function: Given that P(X  1) = 1/8, find the values of
the constants k and a.
3x 2 8 for 0 x  2 15. A continuous random variable X has the
f (x) =  following probability density function:
0 elsewhere
k for 0  x  2
Find P(X  1), P(0.5 < X < 1.5), P(X = 1). 
f  x  = k  2 x  3 for 2  x  3
8. A continuous random variable X has following 0
 elsewhere
probability density function:
Find the of the constants k. Find P(X  1), P(X
3  x  2  56

2
for 0 x  2
f (x) =  > 2.5), P(1  X  2.3).

0 elsewhere
Mathematical Expectation of a Random
Find P(X < 1), P(X > 1). Variable
Suppose a random variable X takes the n values
9. A continuous random variable X which as x1, x2, x3, …,xn with corresponding
assumes the values between X = 1 and X = 4 probabilities f(x1), f(x2), f(x3), …, f(xn).The
has the density function given by
mathematical expectation (or) expected value
1
f (x) = ; 1x4 of X denoted by E(X) is defined as
3
(i) Show that total area under the curve is
E(X) = x1f(x1) + x2f(x2) + x3f(x3) + … + xnf(xn
equal to 1.
n
(ii) Find P(1.5 < X < 3) (iii) Find P(X ≤ 2.2) i.e. E  X  =  xi f  xi 
10. A continuous random variable X having i 1
values only between 0 and 4 has density
It is also called the mean of the discrete r.v.
function given by f (x) = 1  ax ; where “a”
2 Similarly
is constant. Calculate “a”. Find P(1 < X < 2)
E  X 2  =  xi2 f  xi 
n
11. A continuous random variable X has the
density function given by i 1

Mathematical Expectation of a function


f (x) = cx ; 0x2 Random Variable
When Y = aX + b, it is called linear
Determine (i) c (ii) P(1 < X < 1.5)
transformation. The random variable Y is
(iii) P(X < 1.5) (iv) P(X > 3) function of r.v. X. Expected value of Y can be
written in terms of the expected value of X.
1 3 Thus
(v) P   X   (vi) P(X < 1) E(Y) = E(aX + b) = aE(X) + b
2 2
It is important to note that he probability mathematical expectation if probability of the
function of random variable Y will be the same day being hot is 0.40 and for being cloudy is
as the probability function of r.v. X, thus f(x) = 0.35.
f(y)
Properties of Mathematical Expectation 4. Given the following probability distribution:
The mathematical expectation must have the x 0 1 2 3 4
P(x) 1/126 20/126 60/126 40/126 5/126
following properties.
Show that E(2X + 3) = 2E(X) + 3
 E(Constant) = Constant 5. A random variable X has the following
probability distribution:
 E(aX) = aE(X)
x 0 1 2 3
 E(X + a) = E(X) + a P(x) 0.1 0.2 0.3 0.4
(i) Find E(X) and V(X)
 E(aX + b) = aE(X) + b
(ii) Show that E(5X + 8) = 5E(X) + 8
 E(X + Y) = E(X) + E(Y)
 E(X  Y) = E(X)  E(Y) 6  7  x
6. If f(x) = for x = 2, 3, 4, . . . ,12
36
 E(XY) = E(X) E(Y)
Find mean and variance of the random
 E[X  E(X)] = E(X)  E(X) = 0
variable.
 E(X2) ≥ *E(X)+2

Variance & Standard Deviation of Random
Variable
The Variance of a random variable X denoted by
V(X) or σ2 is defined as
V(X) = E(X2)  [E(X)]2
or
σ2 = E(X2)  [E(X)]2
The positive square root of the variance is
called standard deviation and is given by
S.D.(X) = E(X2 )  [E(X)]2


PRACTICE EXERCISE

1. Given the following discrete probability
distribution:
x 0 1 2 3 4 5
P(x) 6/36 10/36 8/36 6/36 4/36 2/36
Compute mean, variance, standard deviation
and coefficient of variation.
2. Given the following probability distribution:
x 0 1 2 3 4
P(x) 1/210 20/210 m 70/210 10/210
Find (i) m (ii) mean and variance of the
distribution.
3. In a summer season, a dealer of desert room
cooler can earn Rs. 800 per day if the day is
hot and can earn Rs.200 per day if it is fair
and loses Rs.50 if it is cloudy. Find his

You might also like