Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Random Variable: "The Number of Heads When Flipping A Coin"

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Random Variable

A random variable is a function or rule that assigns a number


to each outcome of an experiment.

Alternatively, the value of a random variable is a numerical


event.

Instead of talking about the coin flipping event as


{heads, tails} think of it as
“the number of heads when flipping a coin”
{1, 0} (numerical events)
Two Types of Random Variables…
Discrete Random Variable
– one that takes on a countable number of values
– E.g. values on the roll of dice: 2, 3, 4, …, 12

Continuous Random Variable


– one whose values are not discrete, not countable
– E.g. time (30.1 minutes? 30.10000001 minutes?)

Analogy:
Integers are Discrete, while Real Numbers are Continuous
Probability Distributions…
A probability distribution is a table, formula, or graph that
describes the values of a random variable and the probability
associated with these values.

Since we’re describing a random variable (which can be


discrete or continuous) we have two types of probability
distributions:
– Discrete Probability Distribution, (chapter 5) and
– Continuous Probability Distribution (Chapter 6)
Probability Notation…
An upper-case letter will represent the name of the random
variable, usually X.

Its lower-case counterpart will represent the value of the


random variable.

The probability that the random variable X will equal x is:


P(X = x)
or more simply
P(x)
Discrete Probability Distributions…
The probabilities of the values of a discrete random variable
may be derived by means of probability tools such as tree
diagrams or by applying one of the definitions of probability,
so long as these two conditions apply:
Example
The Statistical Abstract of India is published annually. It
contains a wide variety of information based on the census as
well as other sources. The objective is to provide information
about a variety of different aspects of the lives of the
country’s residents. One of the questions asks households to
report the number of persons living in the household. The
following table summarizes the data. Develop the probability
distribution of the random variable defined as the number of
persons per household.
Example
Number of Persons Number of Households (millions)
1 31.1
2 38.6
3 18.8
4 16.2
5 7.2
6 2.7
7 or more 1.4
Total 116.0
Example
Probability distributions can be estimated from relative frequencies.
x P(x)
1 31.1/116.0 = .268
2 38.6/116.0 = .333
3 18.8/116.0 = .162
4 16.2/116.0 = .140
5 7.2/116.0 = .062
6 2.7/116.0 = .023
7 or more 1.4/116.0 = .012
Total 1.000
Example
E.g. what is the probability there are 4 or more persons in any given
household?
x P(x)
1 .268
2 .333
3 .162
4 .140
5 .062
6 .023
7 or more .012

P(X ≥ 4) = P(4) + P(5) + P(6) + P (7 or more)


= .140 + .062 + .023 + .012 = .237
EXAMPLE

A random variable has the following probability


distribution:
x :0 1 2 3 4 5 6 7 8
P(x): k 2k 4k 6k 8k 10k 12k 14k 16k
Find
i) k, ii) P(X<3), iii) P( X  3)
Solution
Soln. Since P(x) is a pmf,
i) k+2k+4k+6k+8k+10k+12k+14k+16k=1
k =1/73
ii) P(X=0)+P(X=1)+P(X=2)=7k=7/73
iii)1-P(X<3)=7/73
Random Variables and Discrete
Probability Distributions
• Example: Consider the probability distribution
that reflects the number of credit cards that
Bankrate.com’s readers carry:
✓ Is this a valid probability
distribution?
✓ What is the probability that a
reader carries no credit cards?
✓ What is the probability that a
reader carries fewer than two?
✓ What is the probability that a reader carries at least two credit
cards?
LO 5.2
Random Variables and Discrete
Probability Distributions
• Consider the probability distribution that reflects the
number of credit cards that Bankrate.com’s readers carry:
✓ Yes, because 0 < P(X = x) < 1
and SP(X = x) = 1.
✓ P(X = 0) = 0.025
✓ P(X < 2) = P(X = 0) + P(X = 1)
= 0.025 + 0.098 = 0.123.
✓ P(X > 2) = P(X = 2) + P(X = 3)
+ P(P = 4*) = 0.166 + 0.165 + 0.546 = 0.877.
Alternatively, P(X > 2) = 1 − P(X < 2) = 1 − 0.123 = 0.877.

LO 5.2
Population/Probability Distribution…
The discrete probability distribution represents a population

Since we have populations, we can describe them by


computing various parameters.

E.g. the population mean and population variance.


Population Mean (Expected Value)
The population mean is the weighted average of all of its
values. The weights are the probabilities.

This parameter is also called the expected value of X and is


represented by E(X).
Population Variance…
The population variance is calculated similarly. It is the
weighted average of the squared deviations from the mean.

As before, there is a “short-cut” formulation…

The standard deviation is the same as before:


Example
Find the mean, variance, and standard deviation for the
population of the number of persons per household. Assume
that the category “7 or more” is actually 7.

E(X) = 1 P(1) + 2 P(2) + ... + 7 P(7)


= 1(.268) + 2(.333) + 3(.162) + 4(.140) + 5(.062) +
6(.023) + 7(.012)
= 2.513
Example

Find the mean, variance, and standard deviation for the


population of the number of persons per household

= (1 – 2.513)2(.268) + (2 – 2.513)2(.333)+…+(7 – 2.513)2(.012)


= 1.958

The standard deviation is

σ= 1.958 = 1.399
Cumulative distribution function (cdf)
• It is a function that provide the cumulative probability up to a point
for a random variable (r.v).

For a discrete r.v:


• P( X  x) = F(x) =  P( X = x)
X :X  x

F(4)=P(X 4)=1-P(X ≥5)=P(X=5)+P(X=6)+P(X=7)


pmf (example)

x P(x)
0 0.05
1 0.05
The probability distribution of 2 0.06
booking of rooms of a hotel in 3 0.10
Waynad during December is: 4 0.13
5 0.20
6 0.15
7 0.26
Total 1.00
pmf (example)
x P(x) x P(x)
0 0.05 0.00
First find the expected value 1 0.05 0.05
7 2 0.06 0.12
E ( X ) =  =  xi P( xi ) 3 0.10 0.30
i =1 4 0.13 0.52
5 0.20 1.00
= 4.71 rooms
6 0.15 0.90
7 0.26 1.82
Total 1.00  = 4.71
pmf (example)
7
V ( X ) =  =  [ xi − ]2 P( xi )
The E(X) is then 2
used to find i =1
the variance: x P(x) x P(x) [x−]2 [x−]2 P(x)
= 4.2259 0 0.05 0.00 22.1841 1.109205
1 0.05 0.05 13.7641 0.688205
The standard 2 0.06 0.12 7.3441 0.440646
deviation is: 3 0.10 0.30 2.9241 0.292410
4 0.13 0.52 0.5041 0.065533
 = 4.2259 5 0.20 1.00 0.0841 0.016820
= 2.0577 rooms
6 0.15 0.90 1.6641 0.249615
7 0.26 1.82 5.2441 1.363466
Total 1.00  = 4.71 2 =
4.225900
pmf (example)

The histogram shows that the distribution is skewed


to the left and bimodal.
0.30

0.25
The mode is 7 0.20

rooms rented but Probability 0.15

the average is only 0.10

4.71 room rentals. 0.05

0.00
0 1 2 3 4 5 6 7
Num ber of Room s Rented

 = 2.06 indicates considerable variation around .


Life Insurance Case
An insurance company sells a $20,000 whole life insurance policy for an annual premium of $300.
Actuarial tables show that a person who would be sold such a policy with this premium has a .001
probability of death during a year. Let x be a random variable representing the insurance
company’s profit made on one of these policies during a year. The probability distribution of x is
x,Profit p(x),Probability of x
$300(if the policyholder lives) .999
$300-$20,000 = -$ 19,700 .001
(a $19,700 loss if the policyholder dies)

The expected value of x (expected profit per year is


$300(.999) + (-$19,700)(.001) = $280
Suppose that we wish to find the premium that the insurance company must charge for a
$20,000 policy if the company wishes the average profit per policy per year to be greater
than $0.If we let prem denote the premium the company will charge ,then the probability
distribution of the company’s yearly profit x is
x,Profit p(x),Probability of x
prem(if the policyholder lives) .999
prem -$20,000 (if policyholder dies) .001
The expected value of x (expected profit per year is
prem(.999) + (prem – 20,000)(.001)
= prem - 20

You might also like