0% found this document useful (0 votes)
14 views22 pages

RV 1

Uploaded by

Kayla Slay
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)
14 views22 pages

RV 1

Uploaded by

Kayla Slay
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/ 22

Random Variables & Probability Distributions

 Random Variables
 Probability and Cumulative Distributions
 Expected Values of Discrete Random Variables
 Variance and Standard Deviation
 The Binomial Distribution
 Other Discrete PD
 Continuous Random Variables

1
Random Variables
A random variable is a variable that assumes numerical values
associated with the random outcome of an experiment, where
one (and only one) numerical value is assigned to each sample
point.

Notice that:
• there are several possible outcomes
• each possible outcome is assigned a single numeric value,
• all outcomes are assigned a numeric value, and
• the value assigned varies over the outcomes.
Random means occurring purely by chance and Variable means
something can take on different possible values. So a random
variable (RV) is anything that can take on different possible values
determined purely by chance. 2
Discrete and Continuous Random Variables

A discrete random variable:


 has a countable number of possible values
 has discrete jumps between successive values
 has measurable probability associated with individual values
 counts

A continuous random variable:


 has an uncountably infinite number of possible values
 moves continuously from value to value
 has no measurable probability associated with each value
 measures (e.g.: height, weight, speed, value, duration,
length) 3
Exercise: Discrete or Continuous?
1. Number of misspelled words in Spelling Bee
2. Amount of water through Mona dam in a day
3. How late a student is for class
4. Number of bacteria in a water sample
5. Amount of CO(Carbon Monoxide) produced from burning a
litre of unleaded gas
6. Your weight
7. Number of checkout lanes at grocery store
8. Amount of time waiting in line at grocery store

4
Example
The code 500 is for busy affluent people who travel a lot. It
can work with a cellular phone, your home phone, office
phone, second-home phone, up to 5 additional phones besides x P(x)
your regular one. The computer technology behind this
0 0.1
1 0.2
service is astounding – what the computer does is to first ring 2 0.3
you at the phone you specify as the primary one. If there is 3 0.2
4 0.1
no answer, the computer switches to the secondary phone and
5 0.1
so on up to five allowable switches. The switches are the
expensive part of the service, so the service provider wants to
get information on these switches. The probability
distribution was obtained from data derived from an
experimental run of the programme.
10
Questions
What is the probability that on any single call:
1. More than two switches occur?
2. At least one switch occur?
3. At most three switches occur?
4. Anywhere from one to three switches will occur?
5. Anywhere from one to four switches (both exclusive) will
occur?
6. Anywhere from one (inclusive) to four (exclusive)
switches will occur?
7. Anywhere from one (exclusive) to four (inclusive)
switches will occur?

11
Cumulative Distribution Function

The cumulative distribution function, F(x), of a discrete


random variable X is:
F(x)  P( X  x)   P(i)
all i  x

x P(x) F(x) P(X 3)  F(3)


0 0.1 0.1
1 0.2 0.3
2 0.3 0.6
3 0.2 0.8 P(1 ≤ X ≤ 3) = F(3) – F(0)
4 0.1 0.9
5 0.1 1.0
Expected Values of Discrete Random Variables

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 x P(x) xP(x)


variable X is equal to the sum of each value of 0 0.1 0.0
the random variable multiplied by its 1 0.2 0.2
probability. 2 0.3 0.6
  E ( X )   xP( x )
3 0.2 0.6
4 0.1 0.4
all x
5 0.1 0.5
2.3 = E(X)=
13
Variance and Standard Deviation of a RV

The variance of a random variable is the expected


squared deviation from the mean:
 2  V ( X )  E[( X   ) 2 ]   ( x   ) 2 P( x)
all x
2
   
 E ( X )  [ E ( X )]   x P( x)   xP ( x)
2 2 2

 all x   all x 

The standard deviation of a random variable is the square


root of its variance:   SD( X )  V ( X )

14
Variance and Standard Deviation of a RV

Number of
 2  V ( X )  E[( X  )2]
Switches, x P(x) xP(x) (x-) (x-)2 P(x-)2 x2P(x)
0 0.1 0.0 -2.3 5.29 0.529 0.0

  ( x  )2 P( x)  2.01
1 0.2 0.2 -1.3 1.69 0.338 0.2
2 0.3 0.6 -0.3 0.09 0.027 1.2
3 0.2 0.6 0.7 0.49 0.098 1.8 all x
4 0.1 0.4 1.7 2.89 0.289 1.6
5 0.1 0.5 2.7 7.29 0.729 2.5
2.3 2.010 7.3
 E( X 2)  [ E( X )]2
P(x) *(x-µ)2

2
   
SD = 2.01 = 1.417745    x2 P( x)    xP( x)
all x  all x 

 7.3  2.32  2.01


15
Coefficient of Variation of a RV

The coefficient of variation (CV) defines a natural measure


of the variability in a certain random variable. There is no
Greek letter for the Coefficient of variation. It is defined as
σ/.

For the switches problem CV = 1.417745/2.3 = 0.616411 or


61.64%

What does this mean?

16
Example: Car Sales
• The total number of cars to be sold next week is described
by the following probability distribution
x 0 1 2 3 4
p(x) 0.05 0.15 0.35 0.25 0.20

• Determine the expected value and standard deviation of X,


the number of cars sold.
5
 X   xi p( xi )  0(0.05)  1(0.15)  2(0.35)  3(0.25)  4(0.20)  2.40
i 1
5
 X   ( xi  2.4) 2 p( xi )  (0  2.4) 2 (.05)  (1  2.4) 2 (.15)
2

i 1

 (2  2.4) 2 (.35)  (3  2.4) 2 (.25)  (4  2.4) 2 (.20)  1.24


 X  1.24  1.11
17
The Binomial Distribution
Bernoulli trials are a sequence of n identical trials satisfying the
following conditions:
1. Each trial has two possible outcomes, called success *and failure.
The two outcomes are mutually exclusive and exhaustive.
2. The probability of success, denoted by p, remains constant from trial
to trial. The probability of failure is denoted by q, where q = 1-p.
3. The n trials are independent. That is, the outcome of any trial does
not affect the outcomes of the other trials.

A random variable, X, that counts the number of successes in n Bernoulli


trials, where p is the probability of success* in any given trial, is said to
follow the binomial probability distribution with parameters n (number
of trials) and p (probability of success). We call X the binomial random
variable. 18
Binomial Probabilities

1. The probability of a given sequence of x successes out of n


trials with probability of success p and probability of failure
q is equal to:
x (n x)
pq
2. The number of different sequences of n trials that result in
exactly x successes is equal to the number of choices of x
elements out of a total of n elements. This number is denoted:

n n!
n
C x    
 x  x!(n  x)!
19
The Binomial Probability Distribution
The binomial probability distribution:

 n x ( n x) n!
P( x)    p q  x ( n x)
pq
 x x!( n  x)!

where :
p is the probability of success in a single trial,
q = 1-p,
n is the number of trials, and
x is the number of successes. 20
Example -- Binomial Probabilities

In one of the constituencies if Jamaica, it was


reported that 60% of the residents support the
governing party. Suppose you selected a random
sample of 15 residents:
 What is the probability that 7 of the residents will
be found to be supporters of the governing party?
 What is the probability that at most 3 of the
residents will be found to be supporters of the
governing party?

21
Solution -- Binomial Probabilities
Given n = 15; p = 0.6 (so q = 0.4) then [ = n*p = 15*0.6 = 9;
2 = n*p*q = 15*0.6*0.4 = 3.6;  = 1.8974]

a) P(7)  C 715 0.6 7 0.4 8  0.118055774


b) P( X  3)  C 015 0.6 0 0.415  0.000001074
 C115 0.610.414  0.000024159
 C 215 0.6 2 0.413  0.000253672
 C 315 0.6 3 0.412  0.001648875
 0.001927769

EXCEL APPLICATION 22
BD -- Mean, Variance & SD
Mean of a binomial distribution:

  E ( X )  np

Variance of a binomial distribution:

  V ( X )  npq
2

Standard deviation of a binomial distribution:

 = SD(X) = npq
23
Other Discrete Probability Distributions:
Poisson
The Poisson probability distribution is useful for determining the
probability of a number of occurrences over a given period of time or within
a given area or volume. That is, the Poisson random variable counts
occurrences over a continuous interval of time or space. It can also be used
to calculate approximate binomial probabilities when the probability of
success is small (p  0.05) and the number of trials is large (n  20).

Poisson D istribution:
 xe 
P( x)  for x = 1,2,3,...
x!
where  is the mean of the distribution (which also happens to be
the variance) and e is the base of natural logarithms (e=2.71828...).

24
Poisson assumptions:
– The probability that an event will occur in a short interval
of time or space is proportional to the size of the interval.
– In a very small interval, the probability that two events
will occur is close to zero.
– The probability that any number of events will occur in a
given interval is independent of where the interval begins.
– The probability of any number of events occurring over a
given interval is independent of the number of events that
occurred prior to the interval.

25
Example -- Poisson
Example: n = 200; p = 1/1000 = 0.001
Telephone manufacturers now offer
np = (200)(0.001) = 0.2
1000 different choices for a telephone
(as combinations of colour, type, .

2 0 e .2
options, portability, etc.). A company P ( 0)  = 0.8187
0 !

is opening a large regional office, and .21 e .2
P (1)  = 0.1637
each of its 200 managers is allowed to 12 !  .2
.2 e
order his or her own choice of a P (2)  = 0.0164
2 !
telephone. Assuming independence of .2 3 e .2
P ( 3)  = 0.0011
choices and that each of the 1000 3!
choices is equally likely, what is the
probability that a particular choice
will be made by none, one, two, or EXCEL
three of the managers? APPLICATION
26
Continuous Random Variables

A continuous random variable is a random variable that can take on any value
in an interval of numbers.

The probabilities associated with a continuous random variable X are determined


by the probability density function of the random variable. The function,
denoted f(x), has the following properties.

1. f(x) 0 for all x.


2. The probability that X will be between two numbers a and b is equal to
the area under f(x) between a and b.
3. The total area under the curve of f(x) is equal to 1.00.

The cumulative distribution function of a continuous random variable:

F(x) = P(X x) =Area under f(x) between the smallest possible value of X (often
-) and the point x.
27

You might also like