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

RANDOM VARIABLES

Kutay TİNÇ, Ph.D.


INTRODUCTION
 
Sometimes, rather than the outcome of an experiment, we are interested in a function
of the outcome. For example we may be interested in the sum of two dice that are
rolled instead of the seperate dice values or we may be interested in the total number
of heads in flips.
These real valued functions defined on the sample space are known as random
variables.
EXAMPLE 1
 
Three balls are randomly selected without replacement from an urn containing 20
balls numbered 1 to 20. What is the probability that at least one of the drawn balls has
a number as large as or larger than 17?
Let denote the largest number drawn. is a random variable taking on one of the
values .
EXAMPLE 1 - CONTINUED
 

Hence
EXAMPLE 2
 
Three balls are randomly chosen from an urn containing 3 white, 3 red, and 5 black balls. Suppose that we
win for each white ball selected and lose for each red selected. If we let denote our total winnings from
the experiment, then is a random variable taking on the possible values with respective probabilities:
(CUMULATIVE) DISTRIBUTION
FUNCTION
 For a random variable , the function defined by

is called the cumulative distribution function (CDF), or more simply the distribution
function of . Thus, the distribution function specifies, for all real values , the
probability that the random variable is less than or equal to .
Suppose that . Because the event is contained in the event it follows that , the
probability of the former is less than or equal to , the probability of the latter. In other
words, is a non-decreasing function of .
DISCRETE RANDOM
VARIABLES
  random variable that can take on at most a countable number of possible values is
A
said to be discrete. For a discrete random variable , the probability mass function of
is defined by:

The probability mass function is positive for at most a countable number of values of
. That is, if must assume one of the values then

Since must take on one of the values , we have;


PROBABILITY MASS
FUNCTION (PMF) GRAPH
 Assume that PMF of is given as:

This random variable’s PMF can be graphed as:


PROBABILITY MASS
FUNCTION (PMF) GRAPH
 If is the sum of two dice, then its PMF can be graphed as:
EXAMPLE 3
 
The probability mass function of a random variable X is given by where is some
positive value. Find:
a)
b)

c)
d)
CUMULATIVE DISTRIBUTION
FUNCTION - REVISITED
 The cumulative distribution function can be expressed in terms of by

For example, if has a probability mass function given by , then its cumulative
distribution function is given by:
CUMULATIVE DISTRIBUTION
FUNCTION - REVISITED
EXPECTED VALUE
 
The expected value of is a weighted average of the possible values can take on, each
value weighted by its respective probability. Expected value of is defined by:

For instance when can assume two values 0 and 1 with following probabilities,

Then expected value of is calculated as:


EXAMPLE 4
 Calculate the expected value of a roll of a die.
Since , we can calculate as:
EXAMPLE 5
  school class of 120 students are driven in 3 buses. There are 36 students in one of
A
the buses, 40 in another, and 44 in the third bus. When the buses arrive, one of the
120 students is chosen randomly. Let denote the number of students on the bus of
that randomly chosen student, find .
EXPECTATION OF A FUNCTION
OF A RANDOM VARIABLE
 We know how to compute , how about a function of , like ?
Problem:
Let denote a random variable that takes on any of the values with respective
probabilities:

Compute .
Letting we have:
EXPECTATION OF A FUNCTION
OF A RANDOM VARIABLE
  is a discrete random variable that takes on one of the values with respective
If
probabilities , then for any real-valued function :

Proof
As we can group the same values of we can write:
EXAMPLE 6
 A product, sold seasonally, yields a net profit of dollars per unit sold and a net loss of
dollars per unit left unsold when the season ends. Let : The number of units of the
product ordered during any season with mass function . If the store must stock this
product in advance, find the expected profit in its simplest form.
Start by denoting as the number of units stocked. Then the profit function would be

Hence the expected profit is:


EXAMPLE 6 - CONTINUED
 
COROLLARY
 If and are constants,

Proof
VARIANCE
  gives us the weighted average of possible values of , but it
does not give us the spread, the variation, of these values.
As we expect to take on values around its mean , it would
appear that a reasonable way of measuring the possible
variation of would be to look at how far apart would be
from its mean on the average.
Definition:
If is a random variable with mean ; then the variance of ,
denoted by is: 
VARIANCE
 

• Variance is always positive.


EXAMPLE 7
 Calculate the variance of the roll of a fair die.
We already know that , hence Then,
COROLLARY
 If and are constants,

Proof
STANDARD DEVIATION
 

Standard deviation is also a measure of variation from the mean, the difference is
StDev is expressed in the same units as the measured data.
DISCRETE UNIFORM
DISTRIBUTION
 
The discrete uniform distribution is a symmetric probability distribution where a
finite number of values are equally likely to be observed; every one of values has
equal probability .
The roll of a fair die is the perfect example of discrete uniform distribution.
Discrete uniform distribution is denoted as with any outcome between and inclusive
having the same probability. Expected value of is
THE BERNOULLI TRIAL
 Suppose that a trial, or an experiment, whose outcome can be classified as either a
success or a failure is performed. If we let , when the outcome is a success and
, when it is a failure, then the probability mass function of X is given by

where is the probability that the trial was a success.


THE BINOMIAL RANDOM
VARIABLE
 Suppose now that independent trials, each of which results in a success with
probability and in a failure with probability , are to be performed. If
represents the number of successes that occur in the trials, then is said to be a
binomial random variable with parameters .
The PMF of a binomial random variable is given by:

where is the number of successes.


EXAMPLE 8
  is known that screws produced by a certain company will be defective with
It
probability 0.01, independently of each other. The company sells the screws in
packages of 10 and offers a money-back guarantee that at most 1 of the 10 screws is
defective.
What proportion of packages sold must the company replace?
Let be the number of defective screws in a package, then is a binomial random
variable with parameters . Hence:

So the desired proportion (probability) is:


EXAMPLE 9
 Suppose that a particular trait (such as eye color or left-handedness) of a
person is classified on the basis of one pair of genes, and suppose also that
represents a dominant gene and a recessive gene. Thus, a person with genes
is purely dominant, one with is purely recessive, and one with is hybrid. The
purely dominant and the hybrid individuals are alike in appearance. Children
receive 1 gene from each parent. If, with respect to a particular trait, 2 hybrid
parents have a total of 4 children, what is the probability that 3 of the 4
children have the outward appearance of the dominant gene?
EXAMPLE 9 - CONTINUED
  we assume that each child is equally likely to inherit either of 2 genes from each
If
parent, the probabilities that the child of 2 hybrid parents will have , , and pairs of
genes are, respectively, and . Hence, since an offspring will have the outward
appearance of the dominant gene if its gene pair is either or , it follows that the
number of such children is binomially distributed with parameters . Thus, the desired
probability is:
PROPERTIES OF THE
BINOMIAL RANDOM
VARIABLE
 
Expected Value:

Variance:

CDF:
POISSON RANDOM VARIABLE
  random variable is a Poisson Random Variable with parameter , if it takes on
A
the following PMF values:
EXAMPLE 10
 Suppose that the number of errors on a page has a Poisson distribution with parameter
Calculate the probability that there is at least one error on a given page.
Letting X denote the number of errors, we are looking for:
PROPERTIES OF THE POISSON
RANDOM VARIABLE
 
Expected Value:

Variance:

CDF:
APPROXIMATION OF
BINOMIAL WITH POISSON
 
For this to give an accurate approximation we need to be large and to be small
enough. In which case the variances of both distributions would also be similar.
EXAMPLE 11
 
Suppose that the probability of an item produced by a certain machine will be
defective is 0.1. Find the probability that a sample of 10 items will contain at most 1
defective item.
Binomial Exact Solution:
Poisson Approximation:
EXAMPLE 12
 
Suppose that earthquakes occur in İstanbul with parameter and with 1 week as the
unit of time (i.e. 2 earthquakes per week).
a. Find the probability that at least 3 earthquakes occur during the next 2 weeks.
b. Find the probability distribution of the time, starting from now, until the next
earthquake.

c.
d. Let denote the amount of time, in weeks, until the next earthquake. The CDF of
is given by: .
GEOMETRIC RANDOM
VARIABLE
 
Suppose that independent trials, each having success probability , , are performed
until the first success occurs. If we let be the number of trials required, then
EXAMPLE 13
  urn contains white and black balls. Balls are randomly selected, one at a time,
An
until a black one is obtained. If we assume that each selected ball is replaced before
the next one is drawn, what is the probability that
a. exactly draws are needed?
b. at least draws are needed?

c.
d. This means that the first trials are a failure: .
NEGATIVE BINOMIAL
RANDOM VARIABLE
 
Suppose that independent trials, each having success probability , , are performed
until a total of successes occur. If we let be the number of trials needed to
accumulate successes, then:
HYPERGEOMETRIC RANDOM
VARIABLE
 
Suppose that a sample size is to be chosen randomly (without replacement) from an
urn containing balls, of which are white and , are black. If we let denote the number
of the white balls selected, then:
EXAMPLE 14
  purchaser of electrical components buys them in lots of size 10. It is his policy to
A
inspect 3 components randomly from the lot and to accept the lot only if all 3 are
nondefective. If 30 percent of the lots have 4 defective components and 70 percent
have only 1, what proportion of lots does the purchaser reject?
Let denote the event that the purchaser accepts a lot, denote the event that the lot has
4 defectives and denote the event that the lot has 1 defective:
EXERCISE 1
 Suppose that the distribution function of X is given by

a)Find
b)Find .
EXERCISE 1 - CONTINUED
 
a.
b. .
EXERCISE 2
 
Airlines find that each passenger who reserves a seat fails to show up with probability
0.1 independently of the other passengers. Teeny Weeny Airlines always sell 10
tickets for their 9 seat airplane while Blockbuster Airlines always sell 20 tickets for
their 18 seat airplane. Which airlines company is overbooked more often?
T: The number of people on a typical flight of TWA
B: The number of people on a typical flight of BA
EXERCISE 3
  salesman has scheduled two appointments to sell encyclopedias. His first
A
appointment will lead to a sale with probability 0.3, and his second will lead
independently to a sale with probability 0.6. Any sale made is equally likely to be
either for the deluxe model, which costs $1000, or the standard model, which costs
$500.
a)Determine the probability mass function of , the total dollar value of all sales.
b)Find and .
EXERCISE 3 - CONTINUED
 ; each sale is equally likely to be $1000 or $500.
a) , the total dollar value of all sales, can take the values 0, 500, 1000, 1500, 2000. The
corresponding probability values are calculated as

b)
EXERCISE 4
  consumer organization that evaluates new automobiles customarily reports the
A
number of major defects in each car examined. Let denote the number of major
defects in a randomly selected car of a certain type. The cumulative distribution
function of is as follows:

a) Draw the probability mass function of .


b) Find ) and .
c) Find .
d) Find Var(X).
EXERCISE 4 - CONTINUED
 
b)
c)
d) 
EXERCISE 5
  you buy a lottery ticket in 50 lotteries, in each of which your chance of winning a
If
prize is , what is the (approximate) probability that you will win a prize
a)exactly once?
b)at least twice?
Let X be the number of wins in 50 lotteries. is binomial with parameters or for
approximation is Poisson with
c)
d)
EXERCISE 6
 
Suppose a bowl has chips numbered . A person draws a chip, returns it, draws another, returns it,
and so on until he gets a chip which has been drawn before and then stops. Let be the number of
drawings required to accomplish this objective. Find the probability mass function of .
Hint: It’s easiest to first compute , and then use the identity:
EXERCISE 7
  marksman (a person skilled in shooting) takes 10 shots at a target and has
A
probability 0.2 of hitting the target with each shot, independently of all other shots.
a)What is the probability of scoring no hits?
b)What is the probability of scoring more hits than misses?
c)Suppose the marksman has to pay $3 to enter the shooting range and he gets $2
dollars for each hit. Let be his profit. Find the expectation and the variance of .
d)Now, assume that the marksman enters the shooting range for free and gets the
number of dollars that is equal to the square of the number of hits. Let be his profit.
Find the expectation of .
 
EXERCISE 7 - CONTINUED
 
a)Let denote the number of hits in 10 independent shots at a target by this marksman.
Then, .

b)
c)
d)

You might also like