CHAPTER 2. Random Variables and Probability Distributions

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 22

CHAPTER 2

RANDOM VARIABLES AND


PROBABILITY DISTRIBUTIONS
Random Variable
 A random variable (RV) is a function or rule that assigns a
number to each outcome of an experiment; For each element
of an experiment’s sample space, the random variable can
take on exactly one value
S

-3 -2 -1 0 1 2 3
There are two types of random variables,
discrete and continuous.

 Discrete Random Variable: An RV that can take


on only a finite or countably infinite set of outcomes
 Continuous Random Variable: An RV that can
take on any value along a continuum (but may be
reported “discretely”)
 Random Variables are denoted by upper case
letters (X)
 Individual outcomes for an RV are denoted by
lower case letters (x)
There are two types of random variables,
discrete and continuous.

Eg 1: X is the number of heads observed in an


experiment that flips a coin 10 times,
 The values of X are 0, 1, 2, . . . , 10.

 Eg2: let Y time to write a statistics exam in a


university where the time limit is 3 hours and
students cannot leave before 30 minutes.
 Y  [30; 180] (Minutes).
Probability distribution
 Probability Distribution: Table, Graph, or Formula that
describes values a random variable can take on, and its
corresponding probability (discrete RV) or density
(continuous RV)
 Discrete Probability Distribution: Assigns probabilities
(masses) to the individual outcomes
 Continuous Probability Distribution: Assigns density at
individual points, probability of ranges can be obtained by
integrating density function
 Discrete Probabilities denoted by: p(x) = P(X=x)(bnn rời rạc)
 Continuous Densities denoted by: f(x) (bnn liên tục)
 Cumulative Distribution Function: F(x) = P(X<x) (bnn rời rạc
hoặc liên tục)
Discrete Probability Distributions
obability (Mass) Function:
x)  P ( X  x)
 p( x)  1 x X X1 x2 … xn
p( x)  1 P(x) P1 p2 … pn

umulative Distribution Function (CDF):


x)  P( X  x)

b)  P ( X  b)   p ( x )
x b

)  0 F ( )  1
x) is not decreasing in x
E.g

 There were two shooters shooting at the same

target. The gunner's probability of winning the target

is 0.6; 0.7; Make a table of probability distribution

refer to the number of the bullets hitting the target?


Example – Rolling 2 Dice (Red/Green)
X = Sum of the up faces of the two die. Table gives value of Y for all elements in S

Red\Green 1 2 3 4 5 6

1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12
Rolling 2 Dice – Probability Mass Function

X p(x)
2 1/36
3 2/36
# of ways 2 die can sum to x
4 3/36 p( x) 
5 4/36 # of ways 2 die can result in
6 5/36
7 6/36
8 5/36
9 4/36
10 3/36
11 2/36
12 1/36
Rolling 2 Dice – Probability Mass Function

Dice Rolling Probability Function

0.18

0.16

0.14

0.12

0.1
p(y)

0.08

0.06

0.04

0.02

0
2 3 4 5 6 7 8 9 10 11 12
y
Expected Value

Expected Value: The expected value of X is


represented by E(X)

E( X )   x p(x )
all x
i i
Example 1: expected value

 E(X) = ?
x 10 11 12 13 14

P(x) .4 .2 .2 .1 .1

 x p( x)  10(.4)  11(.2)  12(.2)  13(.1)  14(.1)  11.3


i 1
i
Example 2
 The test score of 2000 students in statistics:
xi 5 6 7 8 9 10
ni 100 500 700 300 150 250
Find the mean for the population X?
6
E ( X )   xi p ( xi )  ?
i 1

100 500 700


 5  6  7 
2000 2000 2000
300 150 250
 8  9  10   7.325
2000 2000 2000
Note

n
E ( X )   xi p ( xi )  ?
i 1

 The expected value of X approximates the


average (the arithmetic mean, the sum of the
numbers divided by how many numbers are
being averaged).
Variance/standard deviation

  V ( X )  E ( X )   E ( X )
2 2 2
 ???

 Muy= E(X)
 V(X)= E(X-E(X))2>=0

 Shortcut Calculation for Population Variance

  2
Example 3

 Find the mean, variance, and standard


deviation for the population X
X
Continuous Probability Distributions

* PROBABILITY DENSITY FUNCTIONS


f ( x)  F '( x)

* Requirements for a Probability Density Function

1. f(x)  0 for all x between a and b


2. The total area under the curve
between a and b is 1.0.
Continuous Probability Distributions

f(x)  0,  x f(x)




f ( x) dx  1
a b

b
p (a  X  b)   f ( x) dx
a
f(x)

a
F (a)  

f ( x) dx f(x)

O a x
Continuous Probability Distributions

Expected Value: The expected value of X is


represented by E(X)


E( X )   x. f ( x)dx

Variance/standard deviation

  V ( X )  E[( x  ) ]   ( x  )
2 2 2
f ( x)dx


 Shortcut Calculation for Population Variance

  V (X )  E  X
2 2
  2

 Population Standard Deviation   2


Laws of Expected Value
and Variance

 Laws of expected value


1. E(c) = c * E(X+Y) = E(X) + E(Y)
2. E(X + c) = E(X) + c
3. E(c.X) = c. E(X) * V(X+Y) = V(X) + V(Y)
 Laws of Variance if X and Y are independent
1. V(c) = 0
2. V(X + c) = V(X)
3. V(c X) = c2V(X)
Example 4

 The monthly sales at a computer store have a


mean of $25,000 and a standard deviation of
$4,000. Profits are calculated by multiplying
sales by 30% and subtracting fixed costs of
$6,000. Find the mean and standard deviation
of monthly profits.

You might also like