Vous êtes sur la page 1sur 9

# QUAMETH Notes: Random Variables Page 1 of 9

RANDOM VARIABLE

It is an item used to define or denote the outcomes in the sample space known as the
sample points.
It assigns a numerical value to each outcome in the sample space.
It is an item whose numerical value is of a random nature, and therefore cannot be
known with certainty.

Example:
If we toss a coin three times, we can use the random variable x to define the sample
points of this experiment as the number of heads that occur.
Sample Points x Probability or f(x)
HHH 3 1/8
HHT 2 1/8
HTH 2 1/8
HTT 1 1/8
THH 2 1/8
THT 1 1/8
TTH 1 1/8
TTT 0 1/8

In tabular form, the probability distribution function (p.d.f.) of the random variable x
is given as follows:
x f(x)
0 1/8
1 3/8
2 3/8
3 1/8
-----------------
Ef(x) = 1

In formula form:
3!
f(x) = | 3 | (1/8) = -------------- * (1/8) x = 0, 1, 2, 3
\ x . x! (3 - x)!

Types of random variable

1. Discrete - this type of random variable can only assume a finite or countably infinite
number of possible values

Ex. no. of heads in a coin experiment, no. of defectives produced, demand or sales of
a product in units per day, quiz average of students in Quameth rounded off to
the nearest unit, no. of customer arrivals in a bank per hour, no. of customer
complaints received per day by customer service, weight of a can of corned beef
to the nearest gram, etc.
QUAMETH Notes: Random Variables Page 2 of 9

2. Continuous - this type of random variable can take on any value within a given range
Ex. temperature, volume, weight, diameter, time, quiz average of a student, etc.

Ways by which a continuous variable can be converted into a discrete variable

1. Specifying the level of accuracy of measurement
Ex. Continuous variable: diameter of a ball bearing in inches
Discrete variable: diameter of a ball bearing to the nearest tenth of an inch
2. Introducing categories to describe the diff. levels of values of the random variable
Ex. Continuous variable: Final grades (raw scores) of students in Quameth
below 60 0.0
60 - 65 1.0
66 - 71 1.5
72 - 77 2.0
78 - 83 2.5
84 - 89 3.0
90 - 95 3.5
96 - 100 4.0

PROBABILITY DISTRIBUTION

a table or a function which helps us determine or compute the
probability associated to each value of the random variable

Types of Probability Distribution

1. Discrete probability distribution - one that involves a discrete random variable
Ex.
e
-

x

f(x) = ---------- Poisson Distribution
x!
where x = the no. of bank arrivals per minute

2. Continuous probability distribution - one that involves a continuous random
variable
Ex.
1
f(t) = ---- e
-t/|
Exponential Distribution
|
where t = inter-arrival time of customers entering a bank

QUAMETH Notes: Random Variables Page 3 of 9
Discrete Probability Distribution

Characteristics of a discrete probability distribution
1. f(x) > 0 x (for all x)
2. Ef(x) = 1
3. P(X = x) = f(x) refers to the value of the function when the random variable X is
equal to a specific value x

Ex. In the experiment of tossing a coin three times:
P(X = 2) = f(2) = 3/8

Cumulative Distribution Function
a table or a function that determines the probability that the random variable X takes
on values that are less than or equal to a specific value x
x
denoted by: F(x) = P(X s x) = f(x) where: L = lower limit of possible x values
X=L

Example:
x f(x) F(x)
0 1/8 1/8
1 3/8 4/8
2 3/8 7/8
3 1/8 1

f(2) = 3/8
2
F(2) = P(X s 2) = f(x) = f(0) + f(1) + f(2) = 1/8 + 3/8 + 3/8 = 7/8
X=0

Methods of Graphing Discrete Probability Distributions
1. Bar Chart
2. Probability Histogram
Note: Area of histogram = Width x Height = Probability
(Illustrate in class)

Continuous Probability Distribution

The probability distribution of a continuous random variable is referred to as the
continuous density function.
Note: Unlike in the discrete case, f(x) dose not specify the probability that the random
variable X takes on a specific value x, i.e., P(X = x) = f(x). Probabilities in continuous
distributions are evaluated for a given range. This time, the probability (that the random
variable x takes on values within a given range x
1
to x
2
) is represented by the area under
the curve.

QUAMETH Notes: Random Variables Page 4 of 9
Derivation of the Continuous Curve
1. Construct histograms (as in the discrete case)
2. As Ax 0, the curve f(x) is obtained by connecting the points with a smooth curve.
Note: (Illustrate in class)

Most Common Curves
1. Normal Curve - symmetric
2. Skewed to the right - positively skewed
3. Skewed to the left - negatively skewed
Note: (Illustrate in class)

Characteristics of a continuous probability distribution
1. f(x) > 0 1
2. P(X = c) = 0 since ----- = 0

Consequence: P(a s x s b) = P(a < x s b) = P(a s x < b) = P(a < x < b)
(b
3. P(a s x s b) = ( f(x) dx
]a
(U
4. ( f(x) dx = 1 where: L = lower limit of possible range of x values
]L U = upper limit of possible range of x values
Note: The total area under the curve represents the probability of the entire sample space.
5. P(X = x) = f(x), i.e., P(X = 2) = f(2)

Cumulative Density Function
To derive the cumulative density function, just change x to t in the original probability
formula. F(x) is obtained by integrating the function and then substituting t by x.
(x
F(x) = P(X s x) =( f(t) dt
]L
P(x s A) = F(A); P(x > A) = 1 - F(A); P(A s x s B) = F(B) - F(A)

Example:
The random variable x has a density function given by:
f(x) = k (x+1) 0 s x s 2
= 0 elsewhere
a. Find P(0.5 < x < 2)
b. Find P(x > 1.5)
c. Find F(x)
d. Use F(x) to evaluate P(x > 2) and P(1< x < 2.5)
e. Find and o
2

QUAMETH Notes: Random Variables Page 5 of 9
Expectation

The expected value of the random variable x is the average of all possible values of x or
the mean of the x values. It is one of the properties of a probability distribution.

Notation: E(x) or
x
Note: The expectation of x is a weighted average wherein the given probabilities
represent the weight.

Ex. x | 1 2 3 4
------------------------------------- E(x) = 1(.5) + 2(.3) + 3(.1) + 4(.1) = 1.8
f(x)| .5 .3 .1 .1

For discrete probability distributions : E(x) = x f(x)
For continuous probability distributions: E(x) = } x f(x) dx

Expectation of a Function

Let g(x) = pure function of the random variable x
E|g(x)| =
g(x)
= g(x)f(x) if x is a discrete random variable
(U
E|g(x)| =
g(x)
= ( g(x)f(x)dx if x is a continuous random variable
]L

Example:
Let x = demand in units per day
x | 1 2 3 4
f(x) |0.1 0.3 0.2 0.4
Given: Selling Price (SP)=P10/unit; Variable Cost (VC)=P5/unit; Fixed Cost (FC)=P10
Find: Expected Profit
Solution: Profit = g(x) = 10x - 5x - 10 = 5x - 10
x | 1 2 3 4
g(x) | -5 0 5 10
E|g(x)| = g(x)f(x) = (-5)(0.1) + (0)(0.3) + (5)(0.2) + (10)(0.4) = P4.5

Decision Making Process
Decision to be made Alternatives States of Nature
States of Nature - pertains to what actually happens after a decision has been made
Note: When faced with a decision, compute the expected profit or expected cost of all the
alternatives and compare. Choose the alternative that gives the greatest expected profit or
least expected cost.

QUAMETH Notes: Random Variables Page 6 of 9
Variance of a Random Variable (o
2
x
)

measures the dispersion or spread of the values of x
the average of the squares of the deviations of all the x values from the mean
just like
x
, o
2
x
is a property of the probability distribution of x

Basic Formula: o
2
x
= E(x -
x
)
2

Working Formula: o
2
x
= E(x
2
) - (
x
)
2
= E(x
2
) - |E(x)|
2

Note:
x
and o
2
x
are measures that provide description to a population.
Standard Deviation (o
x
) - converts the variance into the same units as the random var. x
o
x
= (o
2
x
)
1/2

Example:
Given: x | 1 2 3 4
------------------------------------------------
f(x) | 0.2 0.3 0.4 0.1

Reqd: o
2
x
E(x
2
) = x
2
f(x) = (1)
2
(0.2) + (2)
2
(0.3) + (3)
2
(0.4) + (4)
2
(0.1) = 6.6
E(x) = (1)(0.2) + (2)(0.3) + (3)(0.4) + (4)(0.1) = 2.4
o
2
x
= 6.6 - (2.4)
2
= 0.84 sq. units
o
x
= 0.92 units

Dispersion or spread of x values: 2.4 - 0.92 < x < 2.4 + 0.92 = 1.48 < x < 3.32

Problem Set: Random Variables

1. A construction company has to complete a project no later than four months from
now or there will be cost overruns. The people involved in the project believe that
there are four possible values of x, defined as the number of months to complete the
project. These are 3, 3.5, 4, and 4.5 months. Furthermore, it is believed that these
four possibilities are in the ratio of 1:2:4:3. Find:
a. f(x)
b. F(x)
c. What is the probability that the project will be completed late?
d. If the project is completed on time, what is the probability that it will be
completed in less than four months?

2. Given: x | 0 1 2 3 4 5 6
-------------------------------------------------------
f(x) | .1 .15 .05 .25 .35 .06 .04

QUAMETH Notes: Random Variables Page 7 of 9
Reqd.: Use F(x) to compute for the following:
a. P(x s 5) b. P(x > 3) c. P(x > 4) d. P(x = 5) e. P(x < 6) f. P(2 < x s 6)

3. The probability distribution of sales of a new drug in units per day is given by:
k
f(x) = ---------- x = 1, 2, 3, 4, 5, 6
x
2

a. What is the probability of selling 2 units of the drug in one day?
b. What is the probability that at least 3 units are sold in one day?
c. What is the probability that 3 units of the drug will be sold within a period of 2
days?
d. Find F(x) in table form.
e. Use F(x) to evaluate the P(2 < x < 5) and P(x > 3).

4. From a box containing 5 red chips and 8 blue chips, three chips are drawn in
succession. Find the probability distribution for the number of blue chips selected if:
a. sampling is done with replacement
b. sampling is done without replacement

5. For the given problem in # 4 above, derive the probability distribution of x (where: x
= number of trials performed before a blue chip is obtained) if the experiment called
for drawing a chip from the box until a blue chip is obtained.
a. assume sampling with replacement
b. assume sampling without replacement

6. A delegation of 5 was selected at random from a list of scholars of whom 5 are
sophomores, 10 are juniors and 5 are seniors.
a. Give the probability distribution function of the variable, number of senior
students in the delegation.
b. Find the probability that less than 3 seniors will be sent as delegates.

7. A box of a dozen eggs contains 7 good eggs and 5 bad eggs. Mr. Thomas Cook is
preparing breakfast for his family - one wife and two kids. He plans to cook an egg
for each one of them plus some bacon. He randomly selects 4 eggs from the box and
sets these aside in a bowl.
a. Determine the probability distribution function of the number of good eggs
contained in the bowl.
b. What is the probability that the bowl contains at most one bad egg?
c. What is the probability that Mr. Cook will have to get eggs from the box again?

8. An operations research analyst has found that the cumulative distribution of a random
variable is given by: F(x) = x
2
/16 x = 1, 2, 3, 4 Reqd.: Find f(x)

9. Let d represent the number of defectives produced in an hours run by a particular
automatic machine. The probability distribution of d is given by:

QUAMETH Notes: Random Variables Page 8 of 9
0.10 if d = 0
kd if d = 1, 2, 3
f(d) = k (6 - d) if d = 4, 5
0 elsewhere
a. What is the probability that in an hours run, the machine will produce at least 3
defectives?
b. Answer (a) if it is known that the machine does produce at least one defect.
c. Set up F(d) and use it to evaluate P(1 s d s 4).
d. Find the mean and variance of the number of defects produced in an hours run.

10. The sales X of a gasoline distributor has a uniform distribution shown in the figure
below. Because of daily equipment limitations, sales will never be less than 5,000
gallons per day and never greater than 25,000 gallon per day. Find the probability
that the distributor sells
a. at least 20,000 gallons
b. between 15,000 and 23,000 gallons using F(x).

11. A research analyst has observed two counters. The probability distribution for the
time in minutes between two arrivals at counter A, denoted by x, is given by
f(x) = 1/5 e
-x/5
x > 0
The probability distribution for the time in minutes between two arrivals in counter B,
denoted by y, is given by
f(y) = 1/8 e
-y/8
y > 0
a. Which of the two counters appear to be busier?
b. If the server at counter A takes a five-minute break, what is the probability that an
arriving customer will not be given service immediately?
c. Find F(y) for counter B.
d. For counter A, find the expected time between two arrivals and the variance of the
inter-arrival time.

12. A gambler who has P1,000 plays the single-die game with the following system: At
the first toss of the die, he bets P300 on even numbers and quits if he wins. If he
loses, he bets P400 on even numbers on the second toss and quits if he wins. If he
loses again, he bets his final P300 on even numbers on the third toss. Is the game
fair?

13. In a gambling game, a man is paid P10 if he draws a king or queen and P15 if he
draws a jack or ace from an ordinary deck of 52 playing cards. If he draws any other
card, he loses. How much should he pay to play if the game is to be fair?
5000 25000
f(y)
QUAMETH Notes: Random Variables Page 9 of 9
14. From an urn containing 8 red beads and 4 white beads, player A is to draw 3 beads at
random without replacement. If A wins P3 for each red bead he draws, how much
should he pay for each white bead he draws in order to make the game fair?

15. A retailer has shelf space for 4 highly perishable items which are destroyed at the end
of the day if they are not sold. The unit cost of the item is P8 and the selling price is
P15. The probabilities for demand are given below:
Demand (x) 0 1 2 3 4
f(x) 0.15 0.20 0.30 0.25 0.10
How many items should the retailer stock at the start of the day in order to maximize
expected profit?

16. Mrs. Estrada is planning to attend a convention and she must send in her room
reservations immediately. The convention is so large that the activities are held partly
in hotel A and partly in hotel B, and Mrs. Estrada does not know whether the
particular session she wants to attend will be held in hotel A or hotel B. She is
planning to stay one day, which would cost her P500 at hotel A and P400 at hotel B,
but it will cost her an extra P80 for cab fare if she stays at the wrong hotel. She feels
that (through experience) there is an 80% chance that the session she wants to attend
will be held at hotel A. What should she do?