Sie sind auf Seite 1von 30

Random Variables

and Distributions

Statistics 101 - Villejo


Random Variables

A random variable is a function whose value is a real


number that is determined by each sample point in
the sample space.
An uppercase letter, say X, will be used to denote a
random variable and its corresponding lowercase
letter, x, will be used to denote one of its values.
Example

Two balls are drawn in succession without


replacement from an urn containing 4 red balls and 3
black balls. The possible outcomes are the values y of
the random variable Y, where Y is the number of red
balls, are
Sample
Space y
RR 2
RB 1
BR 1
BB 0
Example

A hatcheck girl returns 3 hats at random to 3 customers


who had previously checked them. If Smith, Jones, and
Brown, in that order, receive one of the three hats, list the
sample points for the possible orders of returning the hats
and find the values m of the random variable M that
represents the number of correct matches.
Sample
Space m
SJB 3
SBJ 1
JSB 1
JBS 0
BSJ 0
BJS 1
Cumulative Distribution Function

The cumulative distribution function (CDF) of a


random variable X, denoted by F( ), is a function
defined for any real number x as
F(x) = P(X x)
Properties:
a. the range of the CDF is from 0 to 1
b. It is a nondecreasing function
c. every random variable has one and only one
CDF

Note: 1 F(x) = P(X > x)


Discrete Random Variables

Discrete Sample Space. If a sample space contains a


finite number of possibilities or an unending sequence
with as many elements as there are whole numbers or
counting numbers, it is called a discrete sample
space.

A random variable defined over a discrete sample


space is called a discrete random variable.
Discrete Random Variables

Examples of a Discrete Sample Space:

a. Tossing a pair of coins


= {HH, HT, TH, TT}

b. Tossing a coin until a head comes up


= {H, TH, TTH, TTTH, TTTTH, }
Discrete Random Variables

Examples of Discrete Random Variables:

a. The number of new clients acquired by a law firm


in a month
b. The number of claims received by an insurance
company during a day
c. The bacteria count per cubic centimeter in your
drinking water
Probability Mass Function

A probability mass function (PMF) of a discrete


random variable, denoted by f( ), is a function
defined for any real number x as
f(x) = P(X=x).

The values of the discrete random variable X for


which f(x) > 0 are called its mass points.
Probability Mass Function

A probability mass function (PMF) of a discrete


random variable, denoted by f( ), is a function
defined for any real number x as
f(x) = P(X=x).

The values of the discrete random variable X for


which f(x) > 0 are called its mass points.
Example

The PMF of a particular discrete random variable is as


follows:
X -1 0 1 2 3
f(x) 0.09 0.15 0.38 0.23 0.15
Find:
a. P(X 2)
b. F(1)
c. P(-5 < X 1)
d. P(0 X < 3)
Exercise

In order to verify the accuracy of their financial


accounts, companies utilize auditors on a regular
basis to verify accounting entries. Suppose that the
companys employees make erroneous entries 5
percent of the time. If an auditor randomly checks
three entries:
a. Construct the probability mass function of Y, the
number of errors detected by the auditor.
b. Find the probability that the auditor will detect
more than one error.
Continuous Random Variables

Continuous Sample Space. If a sample space


contains an infinite number of possibilities equal to the
number of points on a line segment, it is called a
continuous sample space.

A continuous random variable is one that can assume


the infinitely large number of values corresponding to
the points on a line interval.
Continuous Random Variables

Examples

a. The shelf life of a particular drug


b. The height of water in a dam
c. The amount of money awarded a plaintiff by a
court in a damage suit
d. The weight of a package
Probability Density Function

The probability density function (PDF) of a continuous


random variable, X, denoted by f( ), is a function that
is defined for any real number x and satisfy the
following properties:

a. f(x) 0
b. The area below the whole curve, f(x), and above
the x-axis is always equal to 1; and
c. P(a X b) is the area bounded by the curve f(x),
the x-axis, and the lines x=a and x=b.
Probability Density Function

Remarks:
1. For a continuous random variable, X, the P(X=x) will
always be 0 for any real number x.
2. P(X < x) = P(X x); P(X > x) = P(X x)
3. P(a < X < b) = P(a X b) = P(a X < b) =
P(a < X b) = F(b) F(a)
Example

The PDF of a continuous random variable, X is given


by
0.25 3 < < 7
=
0

Find:
a. P(4< X < 6.5)
b. P(X 5)
Example

The CDF of a continuous random variable X is as


follows:
1 > 1
F X = 3 0 1
0 <0

Find:
a. P(X > 0.25)
b. P(0.3 < X < 0.7)
c. P(0.4 X 1.25)
Expected Value of a Random
Variable
Let X be a discrete random variable with probability
mass function.

x X1 X2 Xn
f(x) = P(X=x) f(X1) f(X2) f(Xn )

The expected value of X, also referred to as the mean


of X, is

= = 1 1 + 2 2 + + =
=1
Remark:

1. The expected value of (X) is the mean of X. In


particular, it is a weighted average.
Example

Let y represent the number of times a customer visits a


grocery store in a 1-week period. Assume that the
following is the probability distribution of y.
y 0 1 2 3
f(y) 0.1 0.4 0.4 0.1

Find the expected value of Y, E(Y). This is the average


number of times a customer visits the store.
Expected Value of g(X)

Let X be a discrete random variable with probability


mass function given by

x X1 X2 Xn
f(x) = P(X=x) f(X1) f(X2) f(Xn )

Suppose Y = g(X) is a discrete random variable, then


the expected value of g(X) is

= ( )
=1
Example

A used car dealer finds that in any day, the


probability of selling no car is 0.4, one car is 0.2, two
cars is 0.15, 3 cars is 0.10, 4 cars is 0.08, five cars is 0.06,
and six cars is 0.01. Let X = number of cars sold and let
Y = 500 + 1500X represent the salesmans daily
earnings. Find the salesmans expected daily earings.

Solution

X 0 1 2 3 4 5 6
f(x) 0.4 0.2 0.15 0.1 0.08 0.06 0.01
Example

Y = g(X) = 500 + 1500X

x 0 1 2 3 4 5 6
g(x) 500 2000 3500 5000 6500 8000 9500

Hence,
E(Y) = E(g(X)) =
(500)(0.4) + (2000)(0.2) + (3500)(0.15) + (5000)(0.1) +
(6500)(0.08) + (8000)(0.06) + (9500)(0.01)
E(Y) = 2,720 , the salesman is expected to earn 2,720 a
day.
Variance of X

Let X be random variable with mean, . The variance of X,


denoted by 2 or Var(X), is defined as
2 = Var(X) = E(X )2 .
The standard deviation of X is the positive square root of
the variance.

For a discrete random variable with a certain PMF,


2 = = ( )2 = 2 ( )
=1
Also, =
Properties of Mean and Variance

1. E(X ) = 0
2. E(aX + b) = a E(X) + b
3. E(X + Y) = E(X) + E(Y); E(X Y) = E(X) E(Y)
4. E(XY) = E(X)E(Y) if X and Y are independent
5. Var(aX + b) = a2 Var(X)
6. If X and Y are independent, then
1. Var(X + Y) = Var(X) + Var(Y)
2. Var(X Y) = Var(X) + Var(Y)
Exercise

Suppose X is a random variable with E(X2) = 10 and E(X) =


2. Find the following:
a. E(2X + 5)
b. Var(X)
c. Var(2X + 5)
d. E(X2 + X)
Example

Suppose a gambler wins 50 if the sum of dots in a toss of a


pair of fair dice is either 7 or 11, and loses 10, otherwise.
Find the expected gain.
Example

Let Y be the demand for a particular magazine at Joes


newstand. It was found to have the probability mass
function as follows:
y 0 1 2 3 4 5 6
f(y) 0.1 0.2 0.3 0.1 0.1 0.1 0.1
Joe sells this magazine for $2.00 a copy, for which he pays
$1.00, and he is refunded $0.10 for each unsold copy.
(a) Calculate the mean and the standard deviation of Y.
(b) Suppose Joe decides to stock 6 copies of the
magazine. Determine the values, and their probabilities,
of the random variable X that represents net profit.
Example

(c) Calculate the mean and standard deviation of X by


using the results in (b)
(d) Suppose 3 copies are stocked. What is Joes expected
profit now? Compare with (c)

Das könnte Ihnen auch gefallen