Upload
bubunrana
View
245
Download
0
Embed Size (px)
Citation preview
8/13/2019 Discrete Random Variables-Part I
1/22
Discrete Random Variables
Distribution, Expectation, Variance
8/13/2019 Discrete Random Variables-Part I
2/22
Random Variable
A random variable is a functionwhose domain is the sample spaceandwhose range is a subset of the set of real numbers.
A random variable is a function that associates a unique numerical valuewith every outcome of an experiment. The value of the random variable willvary from trial to trial as the experiment is repeated. *
Experiment : Toss a coin twice
Sample Space : {HH, HT, TH, TT}
X = number of heads
X(HH) = 2, X(HT) = 1, X(TH) = 1, X(TT) = 0
X : {0,1,2} is a function.
Hence X is a random variable
(*http://www.stats.gla.ac.uk/steps/glossary/probability_distributions.html#randvar)
http://www.stats.gla.ac.uk/steps/glossary/probability_distributions.htmlhttp://www.stats.gla.ac.uk/steps/glossary/probability_distributions.htmlhttp://www.stats.gla.ac.uk/steps/glossary/probability_distributions.htmlhttp://www.stats.gla.ac.uk/steps/glossary/probability_distributions.html8/13/2019 Discrete Random Variables-Part I
3/22
Experiment : Draw three balls at random from an urncontaining two redand two greenballs.
Sample Space = {RRG, RGG}
X = number of red ballsX(RRG) = 2, X(RGG) = 1
X : {1,2} is a function. Hence X is a random variable.
Experiment : Toss two dice.Sample Space = {(1,1), (1,2),, (1,6),, (6,1),(6,6)}
X = sum of the scores obtained in the two tosses
X((1,1)) = 2, X((1,2)) = 3, , X((6,6)) = 12
X : {2, ,12} is a function.X is a random variable
8/13/2019 Discrete Random Variables-Part I
4/22
Discrete Random Variable
A random variable is said to be discrete if the range of values takenby the random variable is eitherfinite or is countably infinite.
All the examples of random variables given till now are discreterandom variables
An example of a random variable which is not discrete is givenbelow :
Experiment : Choose three students at random from PGP-1
Sample Space : {{a, b, c}: a, b, c are students of PGP-1}
X = total sum of weights of the three students in fitness center
X can take any positive value.
Hence X is not a discrete random variable.
8/13/2019 Discrete Random Variables-Part I
5/22
Distribution of a Discrete Random
Variable
Let the random variable X take the values x1, x2, xn,
P(X = xi) = P({: X() = xi})
Let pi= P(X = xi). Then pi 0and pi= 1 The list of values of X along with their
corresponding probabilities of occurrence iscalled the probability distributionof the random
variable XX : x1 x2 xn
P(X = x) : p1 p2 pn
8/13/2019 Discrete Random Variables-Part I
6/22
Example :
Let X be the number of tails in two tosses of a fair
coin. Then X takes the values 0,1,and 2
P(X =0) = P({HH}) =
P(X=1) = P({HT, TH}) =
P(X=2) = P({TT}) =
Therefore the probability distribution of the random
variable X isX : 0 1 2
P(X=x): 1/4
8/13/2019 Discrete Random Variables-Part I
7/22
Example : Toss a die with one side
marked 1, two sides marked 2 and three
sides marked 3 twice. Let X be the sum ofscores in the two tosses. Now note that X
can take the values 2, 3, 4, 5 and 6. The
probability distribution of X is
X : 2 3 4 5 6
P(X=x): 1/36 1/9 5/18 1/3 1/4
8/13/2019 Discrete Random Variables-Part I
8/22
Three Coins are tossed.
Identify the Sample Space.
Let us define the random variable
X= No of HeadsNumber of Tails
Find the Probability Distribution of X
8/13/2019 Discrete Random Variables-Part I
9/22
Sample
Space
X = No of
(Heads
Tails)
P (X=x)
HHH 3 1/8
HHT 1 1/8
HTH 1 1/8HTT -1 1/8
THH 1 1/8
THT -1 1/8
TTH -1 1/8
TTT -3 1/8
8/13/2019 Discrete Random Variables-Part I
10/22
X = No of (Heads
Tails)
P (X=x)
3 1/8
1 3/8
-1 3/8
-3 1/8
8/13/2019 Discrete Random Variables-Part I
11/22
Expectation of a Discrete Random
Variable
Let X be a discrete random variable with
distribution
X : x1
x2
xn
P(X = x) : p1 p2 pn
Then the Expectation of X denoted as E(X)
is defined asE(X) = xi pi = xP(X=x)
= (value x probability)
8/13/2019 Discrete Random Variables-Part I
12/22
Example : Let X be the number of heads in two tosses of afair coin.
The probability distribution of the random variable X is
X : 0 1 2P(X=x): 1/4
Thus E(X) = 0. + 1. + 2. = 1
Example : In the case when the random variable X hasdistribution
X : 2 3 4 5 6
P(X=x): 1/36 1/9 5/18 1/3 1/4
E(X) = 2. 1/36 + 3.1/9 + 4. 5/18 + 5. 1/3 + 6.
= 14/3
8/13/2019 Discrete Random Variables-Part I
13/22
Expectation as Theoretical Average-
An Intuitive View
Let X be a random variable which takes valuesx1, x2, , xkwith probabilities p1, p2, , pkrespectively.
Suppose the experiment is repeated a largenumber, say n times, and each time the value ofX is recorded. Suppose in these n values,x1occurs f1times, x2occurs f2times and so on.
The average value of X is then (x1 f1+ + xk fk)/n As n, fi/npitherefore
(x1 f1+ + xk fk)/nx1 p1+ + xk pk = E(X)
8/13/2019 Discrete Random Variables-Part I
14/22
Properties of Expectation
Let X be a random variable and a, b are
real numbers then
E[a X + b] = a E[X] + b
If P(X 0) = 1 then E(X) 0
8/13/2019 Discrete Random Variables-Part I
15/22
Properties of Expectation
Suppose g(X) is a real valued function of X
Then we define the expectation of functionof random variable as
E[g(X)] = g(xi)P(X = xi) = g(xi) pi
Let g (X) = X2
Thus E(X2) = g(xi)P(X = xi) = xi2 pi
8/13/2019 Discrete Random Variables-Part I
16/22
VARIANCE
If a random variable X has the following probabilitydistribution (t > 0)
X : -t t
P(X=x) :
Then E(X) = 0 for any t but as t increases then the spreadof the distribution increases.
Variance is a measure of spread of a probabilitydistribution.
Variance of a random variable X is defined as
Var(X) = E(XE(X))2= E(X2)(E(X))2 (Proof - exercise)
For the above random variable Var(X) = t2. So as tincreases Var(X) increases.
8/13/2019 Discrete Random Variables-Part I
17/22
STANDARD DEVIATION (S.D.)
The positive square root of Var(X) is called
the standard deviation of X or s.d.(X).
The main advantage of using standard
deviation is that the standard deviation is
measured in the same unit as the original
data whereas the variance is measured in
squared units.
8/13/2019 Discrete Random Variables-Part I
18/22
Properties of Variance and
Standard Deviation
Let X be a random variable and a, b are
real numbers
Var(a X + b) = a2Var(X)
s.d.(a X + b) = |a| s.d.(X)
Var(X) = 0 if and only is there is a real
number t such that P(X = t) = 1.
Since Var(X) 0, E(X2) (E(X))2
8/13/2019 Discrete Random Variables-Part I
19/22
Markovs Inequality
If X is a non-negative random variableand a is a real number > 0 then
P(X a) E(X) / a
Thus P(X > 2E(X))
P(X > 4E(X))
P(X > 100 E(X)) .01
8/13/2019 Discrete Random Variables-Part I
20/22
Chebyshevs Inequality
If X is a random variable with E(X) = andstandard deviation and if a is a real number > 0then
P(|X-| k) 2 / k2
Put X = (X-)2 and a =k2 in Markovs inequalityand you get Chebyshevs Inequality
Thus P(|X-| > 2) (k = 2)
P(|X-| > 3) 1/9 (k = 3)
P(|X-| > 10) .01 (k = 10)
8/13/2019 Discrete Random Variables-Part I
21/22
Example of Markov and
Chebyshevs Inequality Let us suppose that production of a factory is random
variable with mean 50
a) what is the probability that the weeks production willexceed 75
b) what is the probability that the weeks production willexceed 100
c) If the variance is 25, what can be said about theprobability that production will be between 40 and 60
P(X 75) E(X) / 75 = 50/75 = 2/3 P(X 100) E(X) / 75 = 50/100 =
P(|X-| k) 2 / k2
8/13/2019 Discrete Random Variables-Part I
22/22
P(|X-| k) 2 / k2
Given = 50 and 2= 100
P(|X-50| 10) 25/ 100 =
P(|X-50| < 10) 1- =