Sunteți pe pagina 1din 16

1

Random Variables
isa number that you dont know yet
is variable defined by the probabilities of each
possible value in the population.
A random variable
Types of
Random Variables
Discrete Random Variable
Whole Number (0, 1, 2, 3 etc.)
Countable, Finite Number of Values
Jump from one value to the next and cannot take any
values in between.
Continuous Random Variables
Whole or Fractional Number
Obtained by Measuring
Infinite Number of Values in Interval
Too Many to List unlike Discrete Variable
Discrete Random Variable
Examples
Experiment Random
Variable
Possible
Values
Children of One
Gender in Family
# Girls 0, 1, 2, ..., 10?
Answer 33 Questions # Correct 0, 1, 2, ..., 33
Count Cars at Toll
Between 11:00 & 1:00
# Cars
Arriving
0, 1, 2, ...,
Open Check in Lines # Open
0, 1, 2, ..., 8
Washington State Population
Survey and Random Variables
A telephone survey of
households throughout
Washington State.
But some households dont have
phones.
number of telephones,x P(x)
0 0.03500
1 0.70553
2 0.21769
3 0.02966
4 0.00775
5 0.00332
6 0.00088
7 0.00002
8 0.00000
9 0.00015
Total 1.00000
Probability Histogram of Telephone Coverage in
Washington
0.04
0.71
0.22
0.03
0.01 0.00
0.00
0.10
0.20
0.30
0.40
0.50
0.60
0.70
0 1 2 3 4 5 6 7 8 9
Number of Telephone Lines (x)
P
(
x
)
Definitions: Binomial
Binomial: Suppose that n independent experiments, or
trials, are performed, where n is a fixed number, and that
each experiment results in a success with probability p
and a failure with probability 1-p. The total number of
successes, X, is a binomial random variable with
parameters n and p.
We write: X ~ Bin (n, p) {reads: X is distributed
binomially with parameters n and p}
And the probability that X=r (i.e., that there are
exactly r successes) is:
r n r
n
r
p p r X P

|
.
|

\
|
= = ) 1 ( ) (
Binomial example
Take the example of 5 coin tosses. Whats
the probability that exactly 3 heads in 5
coin tosses will occur?
P(getting exactly 3 heads ) = (1/2)
3
(1-1/2)
2
= (1/2)
3
(1-1/2)
2
=10 ()
5
=0.3125=31.25%
|
.
|

\
|
5
3
r n r
n
r
p p r X P

|
.
|

\
|
= = ) 1 ( ) (
SOLUTION
( ) ! 3 ! 5 ( / ! 5 3) -
x
0 3 4 5 1 2
Binomial distribution
function:
X= the number of heads tossed in 5 coin
tosses
number of heads
p(x)
number of heads
0.3125 -
0.03125 -
0.15625 -
Definitions: Bernouilli
Bernouilli trial: If there is only 1 trial with
probability of success p and probability of
failure 1-p, this is called a Bernouilli
distribution. (special case of the binomial
with n=1)
Probability of success:
Probability of failure:
p p p X P = |
.
|

\
|
= =
1 1 1
1
1
) 1 ( ) 1 (
p p p X P = |
.
|

\
|
= =

1 ) 1 ( ) 0 (
0 1 0
1
0
Binomial distribution: example
In tossing a coin 20 times, whats the
probability of getting exactly 10 heads?
176 . ) 5 (. ) 5 (.
10 10
20
10
= |
.
|

\
|
Binomial distribution: example
If 20 consumers are asked whether they like
to buy a certain product , whats the
probability that 2 or fewer of them
dislike?(Assume that there is a 50% chance
a consumer buys the product )
4
4 7 20 18 2
20
2
5 7 20 19 1
20
1
7 20 20 0
20
0
10 8 . 1
10 8 . 1 10 5 . 9 190 ) 5 (.
! 2 ! 18
! 20
) 5 (. ) 5 (.
10 9 . 1 10 5 . 9 20 ) 5 (.
! 1 ! 19
! 20
) 5 (. ) 5 (.
10 5 . 9 ) 5 (.
! 0 ! 20
! 20
) 5 (. ) 5 (.

=
= = = |
.
|

\
|
+ = = = |
.
|

\
|
+ = = |
.
|

\
|
x
x x x
x x x
x
Example: Poisson distribution
Suppose that food poisoning case in certain restaurant has an
incidence of 1 in 1000 person-years. Assuming that members of
the population are affected independently, find the probability of k
cases in a population of 10,000 (followed over 1 year) for k=0,1,2.
The expected value (mean) = = .001*10,000 = 10
10 new cases expected in this population per year
00227 .
! 2
) 10 (
) 2 (
000454 .
! 1
) 10 (
) 1 (
0000454 .
! 0
) 10 (
) 0 (
) 10 ( 2
) 10 ( 1
) 10 ( 0
= = =
= = =
= = =

e
X P
e
X P
e
X P
more on Poisson
Poisson Process (rates)
Note that the Poisson parameter can be given as
the mean number of events that occur in a defined
time period OR, equivalently, can be given as a
rate, such as =2/month (2 events per 1 month) that
must be multiplied by t=time (called a Poisson
Process)
X ~ Poisson ()
!
) (
) (
k
e t
k X P
t k


= =
E(X) = t
Var(X) = t
Example
For example, if closing of savings accounts
in a certain bank are occurring at a rate of
about 2 per month, then whats the
probability that exactly 4 cases will occur in
the next 3 months?
X ~ Poisson (=2/month)
% 4 . 13
! 4
6
! 4
) 3 * 2 (
months) 3 in 4 P(X
) 6 ( 4 ) 3 * 2 ( 4
= = = =

e e
Exactly 6 cases?
% 16
! 6
6
! 6
) 3 * 2 (
months) 3 in 6 P(X
) 6 ( 6 ) 3 * 2 ( 6
= = = =

e e
Continuous Probability Distributions
A continuous random variable is a variable that
can assume any value in an interval
thickness of an item
time required to complete a task
temperature of a solution
height, in inches
These can potentially take on any
value, depending only on the ability to measure
accurately.
The Uniform Distribution
The uniform distribution is a probability
distribution that has equal probabilities for all
possible outcomes of the random variable
x
min
x
max
x
f(x)
Total area under the
uniform probability
density function is 1.0
The Continuous Uniform Distribution:
otherwise 0
b x a if
a b
1
s s

where
f(x) = value of the density function at any x value
a = minimum value of x
b = maximum value of x
The Uniform Distribution
(continued)
f(x) =
Uniform Distribution Example
Example: Uniform probability distribution
over the range 2 x 6:
2 6
.25
f(x) = = .25 for 2 x 6
6 - 2
1
x
f(x)
4
2
6 2
2
b a
=
+
=
+
=
1.333
12
2) - (6
12
a) - (b

2 2
2
= = =
The Normal Probability
Density Function
The formula for the normal probability density
function is
Where e = the mathematical constant approximated by 2.71828
= the mathematical constant approximated by 3.14159
= the population mean
= the population standard deviation
x = any value of the continuous variable, < x <
2 2
/2 ) - ( x
2
e
2
1
= f( x)
Cumulative Normal Distribution
For a normal random variable X with mean and
variance
2
, i.e., X~N(,
2
), the cumulative
distribution function is
) x P(X ) F(x
0 0
s =
x
0
x
0
) x P(X
0
s
f(x)
x
b a
x
b a
x
b a
Finding Normal Probabilities
(continued)
F( a) F( b) = b) < X < P( a
a) P(X F(a) < =
b) P(X F(b) < =
The Standardized Normal
Any normal distribution (with any mean and variance
combination) can be transformed into the
standardized normal distribution (Z), with mean 0
and variance 1
Need to transform X units into Z units by subtracting the
mean of X and dividing by its standard deviation
1) N(0 ~ Z ,

X
Z

=
Z
f(Z)
0
1
Example
If X is distributed normally with mean of 100
and standard deviation of 50, the Z value for
X = 200 is
This says that X = 200 is two standard
deviations (2 increments of 50 units) above
the mean of 100.
2.0
50
100 200

X
Z =

=
The Standardized Normal Table
Z
0 2.00
.4772
Example:
P(Z < 2.00) = 0.5000+0.4772=.9772
.5000
The Standardized Normal Table
Z
0 -2.00
Example:
P(Z < -2.00) = 1 0.9772
= 0.0228
For negative Z-values, use the fact that the
distribution is symmetric to find the needed
probability:
Z
0 2.00
.9772
.0228
.9772
.0228
(continued)
Finding Normal Probabilities
Suppose X is normal with mean 8.0 and
standard deviation 5.0
Find P(X < 8.6)
X
8.6
8.0
Suppose X is normal with mean 8.0 and
standard deviation 5.0. Find P(X < 8.6)
Z
0.12 0
X
8.6 8
= 8
= 10
= 0
= 1
(continued)
Finding Normal Probabilities
0.12
5.0
8.0 8.6

X
Z =

=
P(X < 8.6) P(Z < 0.12)
EXAMPLE 2
The daily water usage per person in
Tetuan, Zamboanga City follows the a normal
distribution with a mean of 20 gallons and a
standard deviation of 5 gallons. About 68
percent of those living in Tetuan will use how
many gallons of water?
About 68% of the daily water usage will lie
between 15 and 25 gallons.
EXAMPLE 2
What is the probability that a person
from Tetuan selected at random will
use at least 20 to less than 24 gallons
per day?
00 . 0
5
20 20
=

=
o
X
z
80 . 0
5
20 24
=

=
o
X
z
- 5
0 . 4
0 . 3
0 . 2
0 . 1
. 0
x
f
(
x
r a l i t r b u i o n : = 0 ,
-4 -3 -2 -1 0 1 2 3 4
P(0 z<.8)
=.2881
EXAMPLE 2
0 x<.8
EXAMPLE 2 continued
What percent of the population use
water at least 18 to less than 26 gallons
per day?
40 . 0
5
20 18
=

=
o
X
z
20 . 1
5
20 26
=

=
o
X
z
Example 2 continued
The area associated with a z-value of 0.40 is
.1554.
The area associated with a z-value of 1.20 is
.3849.
Adding these areas, the result is .5403.
We conclude that 54.03 percent of the
residents use at least 18 but less than 26
gallons of water per day.

S-ar putea să vă placă și