IE 143 Long Exam 1 Coverage
Topics in Probability and Introduction to Stochastic Processes Angelo C. Ani Department of Industrial Engineering UP Los Baños
Review Topics in Probability Probability and Statistics
Image Sources: ocw.mit.edu; betterexplained.com. Both images are modified.
Review Topics in Probability Axioms of Probability Probability, the number used to quantify the likelihood of an event, must satisfy the following axioms:
P(S) = 1 Normality. The probability that the outcome is within sample space S is 1.
0 ≤ P(E) ≤ 1 Nonnegativity. Probabilities must be between 0 and 1.
Additivity. For mutually exclusive events E1 and E2: P(E1 U E2) = P(E1) + P(E2) Probabilities of mutually exclusive events are additive.
Review Topics in Probability Implications of the Axioms of Probability P(Ø) = 0 As defined, a random experiment result must be within the sample space.
P(E’) = 1 - P(E) The probability of the complement of an event is simply probability of the event less from 1.
For E1 and E2 where E1 E2, P(E1) ≤ P(E2) If an event is contained within another event, the probability of the first event is smaller than that of the second.
Review Topics in Probability Addition Rules
P(A U B) = P(A) + P(B) – P(A ∩ B)
P(A U B U C) = P(A) + P(B) + P(C) – P(A ∩ B) – P(A ∩ C) – P(B ∩ C) + P(A ∩ B ∩ C)
A
B
A
B
C
Review Topics in Probability Examples 1. (Ross, 1-48) Assume that each child who is born is equally likely to be a boy or a girl. If a family has two children, what is the probability that both are girls given that (a) the eldest is a girl, (b) at least one is a girl? 2. (Ross, 1-48) Sixty percent of the families in a certain community own their own car, thirty percent own their own home, and twenty percent own both their own car and their own home. If a family is randomly chosen, what is the probability that this family owns a car or a house but not both? 3. State the addition rule formula for the union of four events.
Review Topics in Probability Conditional Probability and Multiplication Rule If new information are provided, initial probability figures may change. Consider two events A and B, the conditional probability of event A given event B (i.e., event B is assumed true), denoted by P (A|B), is given by:
P(A B) PA |B , P(B)
P(B) 0
Multiplication Rule
P(A B) PA |B P(B) PB| A P(A)
Review Topics in Probability Examples 1. (Ross, Example 1-8) Suppose that each of three men at a party throws his hat into the center of the room. The hats are first mixed up and then each man randomly selects a hat. What is the probability that none of the three men selects his own hat? 2. (Ross, 1-14) The probability of winning on a single toss of the dice is p. A starts, and if he fails, he passes the dice to B, who then attempts to win on her toss. They continue tossing the dice back and forth until one of them wins. What are their respective probabilities of winning in terms of p?
Review Topics in Probability Total Probability Rule and Baye’s Theorem Given conditional probabilities, the (unconditional) probability of an event can be derived using the total probability rule.
PB P(B| A) P(A) P(B| A' ) P(A' ) Combining set operation, definition of conditional probability, and total probability rule, Baye’s Theorem is given by:
PB| A P(A) PB| A P(A) PA |B P(B) P(B| A) P(A) P(B| A' ) P(A' )
Both total probability rule and Baye’s theorem can be extended to accommodate several mutually exclusive and exhaustive events.
Review Topics in Probability Examples 1. (Ross, 1-36) Consider two boxes, one containing one black and one white marble, the other, two black and one white marble. A box is selected at random and a marble is drawn at random from the selected box. What is the probability that the marble is black? 2. (Ross, 1-40) A gambler has in his pocket a fair coin and a twoheaded coin. He selects one of the coins at random, and when he flips it, it shows heads. (a) What is the probability that it is the fair coin? (b) Suppose that he flips the same coin a second time and again it shows heads. Now what is the probability that it is the fair coin? (c) Suppose that he flips the same coin a third time and it shows tails. Now what is the probability that it is the fair coin?
Review Topics in Probability Examples 3. (Ross, 1-39) Stores A, B, and C have 50, 75, and 100 employees, and, respectively, 50, 60, and 70 percent of these are women. Resignations are equally likely among all employees, regardless of sex. One employee resigns and this is a woman. What is the probability that she works in store C?
Review Topics in Probability Independence Two events are said to be independent if the occurrence or absence of an event does not affect the occurrence or absence of the other event. Events A and B are said to be independent if one of the following independent statements is true:
1. PA |B P(A)
2. PB | A P(B)
3. PA B P(A) P(B)
Review Topics in Probability Examples 1. Which of the following pair of events are independent events? a. Color-blindness and sex b. The results of the first and second coin tosses c. Race and obesity incidence in US as given below. Prevalence of Obesity* (in million, according to 2010 Census)
Race
Obese
Non-obese
White
82
123
Black
15
23
Hispanic
20
31
Asian / Others
3
23
*Fictional Data
Review Topics in Probability Examples 2. Events A and B are independent. If P(A) = 0.3 and P(B) = 0.4, find P(A U B). 3. (Ross, 1-33) In a class there are four freshman boys, six freshman girls, and six sophomore boys. How many sophomore girls must be present if sex and class are to be independent when a student is selected at random? 4. Are complementary events independent?
Review Topics in Probability Homework 1. Which of the following are random variables with correct probability distributions? If not, identify the reason why. a. . Random Variable Male Female Probability
0.5
0.5
b. X is a continuous random variable with probability density function given by: f(x) = 2x, 0 ≤ x ≤ 1. c. X is a discrete random variable with the following probabilities; probability of 0 for values not enumerated. X
-0.5
0
-1
2
3.5
Probability
0.1
- 0.2
0.5
0.3
0.3
Review Topics in Probability Homework 2. Complete the Discrete Probability Distribution table below. Probability Distribution
Parameters
f(x)
Bernoulli Binomial
Mean p
n, p (1/p)2
Geometric Negative Binomial
r, p
Hypergeometric
n(K/N)
Poisson
Discrete Uniform
Variance
λ
1/n
Discrete Random Variables Discrete Uniform Distribution (Montgomery 3-51) The lengths of plate glass parts are measured to the nearest tenth of a millimeter. The lengths are uniformly distributed, with values at every tenth of a millimeter starting at 590.0 and continuing through 590.9. Determine the mean and variance of lengths.
Discrete Random Variables Binomial Distribution (Ross, 2-16) An airline knows that 5 percent of the people making reservations on a certain flight will not show up. Consequently, their policy is to sell 52 tickets for a flight that can hold only 50 passengers. What is the probability that there will be a seat available for every passenger who shows up?
Discrete Random Variables Multinomial Distribution (modified Ross 2-20) A television store owner figures that 50 percent of the customers entering his store will purchase an ordinary television set, 20 percent will purchase a color television set, and 30 percent will just be browsing. If five customers enter his store on a certain day, what is the probability that two customers purchase color sets and one customer purchases an ordinary set?
Discrete Random Variables Geometric Distribution (Montgomery 3-73) The probability of a successful optical alignment in the assembly of an optical data storage product is 0.8. Assume trials are independent. What is the probability that the first successful alignment requires at least four trials? What is the probability the first successful alignment occurs at the 8th trial if no successful alignment is made in the first four trials?
Discrete Random Variables Negative Binomial Distribution (Ross 2-25) Suppose that two teams are playing a series of games, each of which is independently won by team A with probability p and by team B with probability 1−p. The winner of the series is the first team to win i games. If i = 4, find the probability that a total of 7 games are played in terms of p. Also show that this probability is maximized when p = 1/2.
Discrete Random Variables (Multivariate) Hypergeometric Distribution There are two medicine boxes. The first contains 6 anti-viral and 8 anti-bacterial capsules. The second has 3 anti-viral, 4 anti-bacterial, and 4 anti-fungal capsules. For each medicine box, determine the probability that a sample of five medicine has 3 anti-viral and 2 antibacterial capsules? For the second medicine box, find that probability that a random sample of 6 capsules result to 2 capsules of each find?
Discrete Random Variables Poisson Distribution (Montgomery 3-106) The number of failures of a testing instrument from contamination particles on the product is a Poisson random variable with mean of 0.02 failure per hour. What is the probability that the instrument does not fail in an 8-hour shift? What is the probability that in an 8-hr shift, at most two errors occur?
Discrete Random Variables Examples 1. (Montgomery 3-77) A trading company has eight computers that it uses to trade on the New York Stock Exchange (NYSE). The probability of a computer failing in a day is 0.005, and the computers fail independently. Computers are repaired in the evening and each day is an independent trial. What is the mean number of days until all eight computers fail in the same day? 2. (modified Ross 2-42) Suppose that each coupon obtained is, independent of what has been previously obtained, equally likely to be any of m different types. If m = 5, find the expected number of coupons one needs to obtain in order to have at least one of each type.
Discrete Random Variables Examples 3. (Montgomery 3-129) Flaws occur in the interior of plastic used for automobiles according to a Poisson distribution with a mean of 0.02 per panel. If 50 panels are inspected, what is the probability that the number of panels that have one or more flaws is less than or equal to 2? 4. (modified Montgomery 3-25) An assembly consists of three mechanical components. Suppose that the probabilities that the first, second, and third components meet specifications are 0.95, 0.98, and 0.99. Assume that the components are independent. Determine the probability mass function of the number of components in the assembly that meets specifications. Net profit for the assembly depending on the number of working components is: 3 working components, $200; 2, $10; 1, $5; 0, $20. What is the mean net profit per assembly?
Continuous Random Variables Preliminaries Identify the continuous distributions with the following graphs of density functions. a.
b.
c.
d.
Continuous Random Variables Preliminaries Which of the following statements is/are TRUE about the density function of a continuous random variable? a. The density function, f(x), can take a value more than 1. b. The density function, f(x), is equal to P(X = x). c. The density function f(x) = 1/x2, x ≥ 1 is allowed. d. The density function, f(x), can take negative values.
Continuous Random Variables Continuous Uniform Distribution (Montgomery 4-32) Suppose X has a uniform distribution over the interval [-1, 1]. (a) Find the probability that X is less than 0.5. (b) Determine the value of x such that P(-x < X < x) = 0.9.
Continuous Random Variables Normal Distribution (Montgomery 4-60) The weight of a sophisticated running shoe is normally distributed with a mean of 12 ounces and a standard deviation of 0.5 ounces, What is the probability that a shoe weighs more than 13 ounces?
Continuous Random Variables Exponential Distribution (Montgomery 4-130) The CPU of a personal computer has a lifetime that is exponentially distributed with a mean lifespan of 6 years. You have owned this CPU for three years. What is the probability that the CPU fails in the next three years?
Continuous Random Variables Erlang Distribution (Montgomery 4-103) The time between arrivals of customers at an automatic teller machine is an exponential random variable with a mean of 5 minutes. What is the probability that the time until the fifth customer arrives is less than 15 minutes?
Continuous Random Variables Hyper-exponential Distribution Type 1 light bulbs have a mean lifespan of 3 years. Type 2 has a mean lifespan of 1 year. Assume that the lifetimes are exponentially distributed. A box contains 1 type 1 bulb and 2 type 2 bulbs. A random bulb is chosen from the box. (a) What is the probability density function of the lifespan of the chosen bulb? (b) What is the probability that it will fail in its first year? (c) If it fails within the first year, what is the probability that it is the type 1 bulb?
Continuous Random Variables Sample of Joint Continuous Distribution (inspired by a problem from an equivalent MIT open course). Two lovers expect to meet at 12nn. Both persons will arrive within the range 11:50am - 12:10pm (continuous uniform). If they are both impatient, (i.e. a person leaves 5 minutes after s/he arrives when the partner is not yet there), what is the probability that they eventually meet?
Continuous Random Variables Homework 1. A student has two calculators – an old and a new one. The time it takes the old calculator to provide an answer to a difficult integration problem is exponentially distributed with mean 8 seconds. The new one gives the answer uniformly between 2 seconds and 6 seconds. If the integration was computed within 4 seconds, what is the probability that the student used the old calculator? 2. (modified Ross 2-33) Let X be a random variable with probability density: f(x) = c(1-x2), -1 < x < 1, 0 otherwise. (a) What is the value of c? (b) What is the cumulative distribution function of X? (c) What is P(X < ½)? What is the mean and variance of X?
Continuous Random Variables Homework 1. Evaluate the following. Assume that λ and s are constants. a. b. x d (e 1) d 2 (e x 1) e
dx
c.
1
0
dx 2
e sx ( x)dx e sx (2 x)dx 1
2
e
Moment-Generating Function Definition The moment-generating function, Mx(s), is given by the formula:
Mx (s) E(e sX ) Specifically, for respectively:
discrete
Mx (s)
and
continuous
e sx f ( x)
random
variables,
Mx (s) e sx f ( x)dx
x
x
As the name implies, these functions can be used to determine moments of the distribution function using the formula:
E(X k ) M(k) X (0)
d (k ) ds
(k )
MX (0)
Moment-Generating Function Poisson Example Using MGF, fund the mean and variance of the Poisson random variable with parameter λ (i.e., X ~ P(λ)). Recall the Poisson is a discrete random variable with pdf:
e x f ( x) x! Thus, the MGF is given by:
Mx (s)
e sx f ( x)
e sx
x 0
x
sx x e Mx (s) e x! x 0
e x x!
Moment-Generating Function Poisson Example
s x ( e ) Mx (s) e x! x 0
Recalling that Maclaurin series of ex:
ex
n 0
xn n!
Thus, going back to the MGF of Poisson: e s
Mx (s) e e Mx (s) e
(e s 1)
Moment-Generating Function Poisson Example To get the mean, recall that E(X) = M’X(0). Thus, differentiating Mx(s):
M'X
( s) e
(e s 1)
e s
Substituting s = 0,
E(X) M'X (0) For variance, V(X) = E(X2) – [E(X)]2. E(X2) can be derived using MGF. Recall homework do get the second derivative of MX(s). 2
E(X )
M'X'
(0) e
(e s 1)
2 2 s ( e s 1)
e e e s
s 0
2
V(X) E(X 2 ) - (E(X)) 2 (2 ) ( ) 2
Moment-Generating Function Continuous Uniform Example Find the MGF of the continuous uniform random variable, X ~ U(a, b). Can we use the MGF to determine its mean? The density function of the uniform distribution is:
1 f ( x) , a X b ba Thus, the MGF is given by: b
sx e Mx (s) e sx f ( x)dx dx ba
x
a
sx
e Mx (s) s(b a)
b
xa
e bs e as s(b a)
Moment-Generating Function Continuous Uniform Example To get mean, we differentiate MX(s), and substitute s = 0.
M'X (s)
s(b a)(be bs ae as ) (e bs e as )(b a)
M'X (s)
s(b a)2
s(be bs ae as ) (e bs e as ) s 2 (b a)
However, substituting s = 0 will make the derivative undefined. Thus, it can be deduced that moments of probability distributions cannot always be derived using MGFs.
Moment-Generating Function Constant Random Variable Example A constant random variable with value X = k has a mass function:
f ( x) 1,
X k.
Thus, the corresponding MGF is:
Mx (s) e sk (1) e sk Differentiating twice,
M'X (s) ke sk
E(X) M'X (0) k
M''X (s) k 2e sk
E(X 2 ) M''X (0) k 2
V(X) E(X 2 ) - (E(X)) 2 k 2 (k ) 2 0
Moment-Generating Function Triangular Random Variable Example Consider a triangular random variable X, X ~ T(0,1,2)
x, f ( x) 2 x,
1
2
0
1
Mx (s) e sx ( x)dx e sx (2 x)dx
0 x 1 1 x 2
Moment-Generating Function Triangular Random Variable Example Note first the following integral derived using IBP (verify this at home!).
xe dx sx
1 s2
e sx sx 1
Going back to the MGF: 1
2
0
1
Mx (s) e sx ( x)dx e sx (2 x)dx 1
2
2
2 sx 1 sx Mx (s) 2 e sx 1 e 2 e sx 1 s s s 0 1 1 1
sx
2 2s 2 s 1 2s 1 s Mx (s) 2 e s 1 2 1 e e 2 e 2s 1 2 e s 1 s s s s s s 1
s
1
Moment-Generating Function Triangular Random Variable Example 2 2s 2 s 1 2s 1 s Mx (s) 2 e s 1 2 1 e e 2 e 2s 1 2 e s 1 s s s s s s 1
s
1
2 s 1 2s Mx (s) 2 e s 1 2 1 e 2 e 1 s s s s 2
Mx (s)
1
s
2e s 1 e 2 s s
2
e 2 s 2e s 1
e 1 Mx (s) s s
s2 2
Notice that the MGF cannot be used to solve for the moments.
Moment-Generating Function Table of MGF’s for Some Distributions Discrete
MGF
Binomial (n,p)
( pe 1 p)
Geometric (p) Negative Binomial (r, p) Poisson (λ)
s
n
pe s
MGF
Uniform (a, b)
e bs e as s(b a)
Exponential (λ)
1 (1 p)e s pe s s 1 (1 p)e
Continuous
r
exp{ (e s 1)}
Erlang (r, λ)
Normal (μ, σ2)
s s
exp{s
r
2s2 2
}
Moment-Generating Function One-to-one Correspondence of MGF and RV The MGF identifies the probability distribution. No other probability distribution (unless they’re equivalent) will yield the same MGF. Using this property of MGF, find the corresponding probability distribution (with parameters) of the MGF below. 0.3e s 1 0.7e s
4
The previous table suggests that the underlying distribution is negative binomial with r = 4, p = 0.3.
Moment-Generating Function Convolutions of Independent RVs Consider two independent random variables X and Y with pdf fX(x) and fY(y). It is known that: E[g(x)h(x)] = E[g(x)] E[h(y)] (Simple proof is found in Ross) Now, consider Z = X + Y. MGFZ(s) = E[es(X+Y)] MGFZ(s) = E[esX esY)] MGFZ(s) = E[esX] E[esY)] MGFZ(s) = MGFX(s)*MGFY(s)
Thus, if a random variable is the sum of two independent random variables, its MGF is the product of the individual MGFs of the other random variables. Z is said to be the convolution of X and Y. (This is very similar to convolution in Laplace.)
Moment-Generating Function Convolutions of Independent RVs Discrete Distribution
Continuous Distribution
Bi(m, p) + Bi(n, p) = Bi(m + n, p)
U(a, b) + U(a, b) = T(2a, a + b, 2b)
P(λ1) + P(λ2) = P(λ1 + λ2)
N(μ1, σ12) + N(μ2, σ22) = N(μ1 + μ1, σ12 + σ22)
G(p) + G(p) + ... + G(p) = NB(r, p) (r times)
E(λ) + E(λ) + ... + E(λ) = Er(r, λ) (r times)
NB(r1, p) + NB(r2, p) = NB(r1 + r2, p)
Er(r1, λ) + Er(r2, λ) = Er(r1 + r2, λ)
Moment-Generating Function Convolutions of Independent RVs 1. Find the convolution of the independent RVs below with the following MGFs. a. Poisson (λ = 5) and Poisson (λ = 4). b. Normal (μ = 41, σ = 3) and Normal (μ = 28, σ = 4) c. Uniform (a = 0, b = 1) and Uniform (a = 0, b = 1) d. Geometric (p = 0.5), another Geometric ( p = 0.5), and another Geometric (p = 0.5) 2. Let X and Y be the length of two rods joined together. X is normally distributed with parameters μ = 2 and σ2 = 1. Y is normally distributed with μ = 4 and σ2 = 0.5. Assume that X and Y are independent. What is the probability that 5 ≤ X + Y ≤ 6 ?
Moment-Generating Function MGF of the Sum of Independent R.V.s 3. The final exam of a college course is administered in three parts – Part I, 20 items; Part II, 10 items; Part III, 10 items. If all of the parts have four choices each and the student simply guesses in all questions, what is the probability that the student gets at least 12 correct answers? 4. Given is the MGF of a continuous random variable X. 2e 5s M X ( s) 2s
a. Graph the pdf of the random variable. b. What is the P(X > 0)? c. Find the mean of X by differentiating the MGF.
Moment-Generating Function Summary of the Properties of MGF 1. For a probability distribution, the MGF, MX(s), is defined as MX(s) = E(esX). 2. In most of the basic distributions, MGF can be used to determine their corresponding moments. But there are exceptions. 3. MGF uniquely identifies a probability distribution. That means a probability distribution has its own MGF and the said MGF cannot be derived using other probability distribution (i.e., one-is-to-one correspondence of the distribution and MGF). 4. If a random variable is the sum of two independent random variables, its MGF is the product of the individual MGFs of the other random variables.
Moment-Generating Function Homework 1. The arrival of male clients who attended a social event is Poisson distributed with mean of 12/hr. The number of female clients who attended the said event is likewise Poisson with mean of 20/hr. Let Y be the number of total clients who arrive within the next 2 hours. What is the distribution of Y? Find P(Y < 20). 2. Consider the following the continuous RVs X1, X2, Y, and Z: X1 ~ U(10, 20) X2 ~ U(10, 20) Y = X1 + X2 Z = Y + 20 a. What is the MGF of Z? b. Draw the pdf of Z. c. Use the MGF of Z to get its mean. d. Find P( Z < 45). Shade the appropriate area that corresponds to the said probability.
Derived Distribution, Y = f(X) Preliminary Ramon was asked to measure a sample (n=50) of square lots in a large subdivision. Using Stat::Fit, he was able to determine the distribution of the length of the side: continuous uniform with min = 9m, and max = 11m. Find the following: a. the average length of side b. the probability that a randomly-selected lot has a side greater than 9.75m c. the average area of the lots d. the variance of the area of the lots e. the probability that a lot has an area less than 90 sq.m.
Derived Distribution, Y = f(X) Example Measurements of TV or computer screen is usually presented according to the length of its diagonal, X. Thus, a 12” TV screen has a diagonal of 12 inches. If we assume that screens are always square with length of sides denoted by Y, X = Y√2 (by Pythagorean Theorem). The viewing area, denoted by A, is usually reported as well. Its distribution is known to be uniformly distributed with min = 64 and max = 196 (in inches2). a. Determine the relationship of X and A. b. Find FX(x) anf fX(x). c. What is the probability that a randomly chosen TV/computer is 13” or smaller? d. Find E(X).
Derived Distribution, Y = f(X) Example A garments factory has a collection of sewing machines. Combined with a number of differently-skilled employees, the sewing speed, S, is known to be exponentially distributed with mean 40 (inches/min). Every item produced in the factory requires 20 inches of stitch. Let T be the time to finish a single piece of item. a. What is the relationship (formula) of S and T? b. What is the cdf of T, F(t)? c. Setup the integral (do not solve) that will give the mean of T. Include limits of integration.
Derived Distribution, Y = f(X1, X2) Example
Insurers pay some amount of money to an insured person if s/he incurred a critical illness (assume only two types: cancer and heart attack) or when s/he dies. At an age of 25, it is known that average time it takes to diagnose cancer is 30 years, while the mean time before a heart attack is 40 years. Mean lifespan is another 40 years (after age 25). Assume the distributions of these times are exponential. What is the mean time before the insurer gives money to the policyholder?
Derived Distribution, Y = f(X1, X2) Example
A vehicle remains in the shop while being repaired. Two repairs are simultaneously performed on a vehicle. Let X be the duration of repair 1 and let Y be the duration of repair 2. X ~ U(2,5) and Y ~ U(3,6) (in hours). Let Z be the total stay time of the vehicle in the shop. Assume that X and Y are independent. What is the pdf of Z? What is E(Z)?
Derived Distribution Homework 1. A radius of a circular table follows a uniform distribution with a = 100 and b = 102 (in inches). a. Find the mean area of the table. b. Find the probability density function of the area of the table. c. Find the probability that it’s area is at least 10,200π sq.in. 2. A $1000-investment in an account earns r = 5% interest compounded continuously annually. The duration of the investment, X, (in years) is uncertain (due to unforeseen emergencies) but follows an exponential distribution with mean 10 years. Let Y be the amount to be withdrawn. Find (a) FY(y), (b) fY(y), (c) P(Y < $2,000) and (d) E(Y) using fY(y). Assume continuous interest rate formula: Y = 1000erX.
Conditional Expectations Preliminary The average number of children of Filipino families in Luzon, Visayas, and Mindanao is 4.2, 5.8, and 6.1, respectively. If around 45% of families reside in Luzon, 30% in Visayas, and 25% in Mindanao, find the average number of children of a Filipino family.
E(X) = 4.2*0.45 + 5.8*0.30 + 0.25*6.1 = 5.155 children
Conditional Expectations Preliminary (from Ross, 9ed) A miner is trapped in a mine containing three doors. The first door leads to a tunnel that takes him to safety after two hours of travel. The second door leads to a tunnel that returns him to the mine after three hours of travel. The third door leads to a tunnel that returns him to his mine after five hours. Assuming that the miner is at all times equally likely to choose any one of the doors (he forgets which door he previously choose), what is the expected length of time until the miner reaches safety?
Conditional Expectations Preliminary Let X be the time it takes the miner to reach safety. Let Y correspond to door number. E(X | Y = 1) = 2 E(X | Y = 2) = 3 + E(X) E(X | Y = 3) = 5 + E(X) E(X) = (1/3)*(2) + (1/3)*(3 + E(X)) + (1/3)*(5 + E(X)) E(X) = 10 hrs
Conditional Expectations Preliminary Find the expected number of coin tosses before you get three consecutive heads, HHH.
Let H be the number of tosses before you get a heads. Let HH be the number of additional tosses before you get two consecutive heads Let HHH be the number of additional tosses before you get three consecutive heads. Let 1H be the event that your last toss was heads. Prior to that, the toss was not heads. Let 2H be the event that your last tosses were heads. Prior to that, the toss was not heads.
Conditional Expectations Preliminary E(H) = 0.5*(1) + 0.5*(1+ E(H)) E(H) = 2 E(HH | 1H) = 0.5*(1) + 0.5*(1 + E(H) + E(HH | 1H)), where E(H) = 2 E(HH | 1H) = 4 E(HHH | 2H) = 0.5*(1) + 0.5*(1 + E(H) + E(HH | 1H) + E(HHH | 2H)), where E(H) = 2 and E(HH | 1H) = 4 E(HHH | 2H) = 8 E(HHH) = E(H) + E(HH | 1H) + E(HHH | 2H) E(HHH) = 2 + 4 + 8 = 14 tosses
Conditional Expectations Expectation of Conditional Expectation (modified from Montgomery 5-40) The joint probability distribution function of X and Y is given by fXY(x,y) = cxy, 0 < x < 3, 0
Law of Total Variance Proof E(V(X|Y))
= E{ E(X2|Y) – [E(X|Y)]2 } = E{E(X2|Y)} – E{[E(X|Y)]2} = E(X2) – E{[E(X|Y)]2}
V(E(X|Y))
= E{[E(X|Y)]2} – {E[E(X|Y)]}2 = E{[E(X|Y)]2} – [E(X)]2
Adding E(V(X|Y)) and V(E(X|Y)): E(V(X|Y)) + V(E(X|Y)) = E(X2) – [E(X)]2 Recall that: V(X) = E(X2) – [E(X)]2. Hence:
V(X) = E(V(X|Y)) + V(E(X|Y))
Law of Total Variance Example The number of bedrooms in a house of a certain village follows a Binomial distribution with n = 3 and p = 0.75. If a house has at least two bedrooms, the number of occupants per bedroom is Poisson distributed with mean of 2. Meanwhile, in a house with less than two bedrooms, the number of occupants per bedroom is Poisson distributed with mean 2.5. Determine the average number of total occupants of bedrooms in a randomly selected house. Determine the variance of the total number of bedroom occupants.
Law of Total Variance Example Let X be the total bedroom occupants. Let Y be the number of bedrooms in a house. y
P(Y = y)
E(X|Y)
V(X|Y)
0
1/64
0
0
1
9/64
2.5
2.5
2
27/64
4
4
3
27/64
6
6
E(X) = E(E(X|Y)) = 0*(1/64) + 2.5*(9/64) + 4*(27/64) + 6*(27/64) = 4.57 V(X) = E(V(X|Y)) + V(E(X|Y)) = {0*(1/64) + 2.5*(9/64) + 4*(27/64) + 6*(27/64)} + { 02*(1/64) + 2.52*(9/64) + 42*(27/64) + 62*(27/64) – 4.572 } = 4.57 + 1.93 = 6.50
Compound Random Variable Preliminary Consider the random variables N, Xi, and Y. Assume that X and N are independent. Meanwhile, Y is given by the formula: Y = X1 + X2 + ... + XN N – a nonnegative random variable Xi – identical and independent random variables with mean μ and variance σ2. Y – a compound random variable.
Compound Random Variable Mean and Variance Formula E(Y | N = n) = nμ E(Y) = E(E(Y|N)) = ∑n nμ fN(n) = μ ∑n n fN(n) = μ E(N) V(Y | N = n) = nσ2 V(Y) = E(V(Y|N)) + V(E(Y|N)) = { ∑n nσ2 fN(n) } + { ∑n (nμ)2 fN(n) – [E(Y)]2 } = σ2 ∑n n fN(n) + μ2∑n n2 fN(n) – μ2E(N)2 = σ2E(N) + μ2 { ∑n n2 fN(n) – E(N)2 } V(Y) = σ2E(N) + μ2V(N)
In summary:
E(Y) = E(X)E(N) V(Y) = V(X)E(N) + [E(X)]2V(N)
Compound Random Variable Example A graduate student visits several companies to ask their participation in a FGD she is conducting. These companies are located in a single industrial site. If the time of visit per company is uniformly distributed between 8 and 12 minutes, and the probability that a company agrees to participate is 0.3, determine the mean and variance of the total time before the student finds 4 willing companies, the number required in her FGD.
Compound Random Variable Example Let Xi be the time spent in a single company, i = 1, 2, 3, …, N. Let N be the number of companies to be visited. Let Y be the total time it takes to find 4 willing ones. Y = X1 + X2 + ... + XN Xi ~ U(8, 12) N ~ NB(r = 4, p = 0.3)
E(X) = 10 E(N) = 4/0.3
V(X) = 42/12 V(N) = 4*0.7 / 0.32
E(Y) = E(N)E(X) = 10*4/0.3 = 133.33 mins V(Y) = V(X)E(N) + [E(X)]2V(N) = (42/12)(4/0.3) + (102)(4*0.7 / 0.32) = 3,128.89 mins2
Compound Random Variable Example The lead time before an ordered item arrives in the store is (discrete) uniformly-distributed between 3 and 6 days. The daily demand is normally distributed with mean and standard deviation of 12 and 3 units, respectively. To prepare for the demand while the item is being ordered, the manager already placed an order even though there are 50 pcs still available. a. Find the mean and variance of the total demand during lead time. b. Find the probability that there will be a stockout during the lead time period.
Compound Random Variable Example Let Xi be the demand for day i, i = 1, 2, 3, …, N. Let N be the lead time (in days). Let Y be the total demand during lead time. Y = X1 + X2 + ... + XN Xi ~ N(12, σ = 3) N ~ Disc U(3, 6)
E(X) = 12 E(N) = 4.5
V(X) = 9 V(N) = (42-1)/12
E(Y) = E(N)E(X) = 12*4.5 = 54 units V(Y) = V(X)E(N) + [E(X)]2V(N) = 9*(4.5) + (122)(15/12) = 220.5 units2 Notice that V(Y) is the usual variance in ROP formula in IE 151. V(dLT) = σd2E(LT) + [E(d)]2σLT2 Demand during lead time is a compound random variable!
Compound Random Variable Example In IE 151, it is usually assumed that the demand during lead time is normally distributed. However, this is just an approximation. To get exact probability of stockout, SO, during the lead time, total probability rule is invoked. P(SO) = P(SO | N = 3) P(N=3) + P(SO | N = 4) P(N=4) + P(SO | N = 5) P(N=5) + P(SO | N = 6) P(N=6) = ( 1 – Φ((50 – 12*3)/sqrt(9*3))(1/4) + ( 1 – Φ((50 – 12*4)/sqrt(9*4))(1/4) + ( 1 – Φ((50 – 12*5)/sqrt(9*5))(1/4) + ( 1 – Φ((50 – 12*6)/sqrt(9*6))(1/4) = 58% The probability of stockout is large since the company is not protected when LT is large.
Compound Random Variable Homework A quality engineer documents the reasons why some parts are rejected. All parts that do not meet specifications are inspected. It is known that from a batch of relatively high lot size, the number of rejected parts to be inspected is Poisson-distributed with mean of 2.4. The time of inspection per part is exponentially distributed with mean of 1 min. Let Y be the total time required to inspect all rejected parts in a given lot. a. What is the probability that the total inspection time of one rejected part is more than 1.2 min? b. Find E(Y) and V(Y). c. What is the probability that in a given batch, 4 parts are rejected AND the total inspection time is at least 5 mins?
Stochastic Processes Definition Ross, 9ed A stochastic process, { X(t), t Є T } is a collection of random variables. That is, for each t Є T, X(t) is a random variable. The set T is the index set of the process. The stochastic process is said to be a discrete-time process if T is a countable (discrete set). If T is an interval, the process is said to be a continuous-time process. The state space of the the stochastic process is the set of all possible values of of the random variables X(t). X(t) or sometimes denoted by Xt is called the state of the process at time t. The stochastic process is a family of random variables that describes the evolution through time of the process (characterized by its state).
Stochastic Processes Example Identify if the following are stochastic processes: a. The number of students in a class in the College of Engineering. Twelve rooms were simultaneously and randomly chosen. {Xt, t = 1, 2, ... , 12} = {23, 45, 32, 28, 17, 21, 32, 28, 30, 30, 21, 28}. b. The number of waiting customers in a supermarket queue. { Xt, t ≥ 0 } = {0, 0 ≤ t ≤ 2.4; 1, 2.4 < t ≤ 6.7; 2, 6.7 < t ≤ 10.1; 1, 10.1 < t ≤ 14.5; 2, 14.5 < t ≤ 17.4; ...} c. The temperature (in C) in a refrigerated room. { Xt, t ≥ 0 } = { Xt = -5 for t ≥ 0 }. d. The daily ending inventory, in pcs, of a shop. {Xt, t = 0, 1, 2, ...} = {12, 9, 7, 2, 0, 0, 45, 41, 32, 28, ... }
Bernoulli Process Description
Discrete-time process. The state of the process, X, assumes two values only (commonly used variables are 0 and 1, though any other combination is allowed. The distribution of all X(t)’s must be identical and independent.
Bernoulli Process Example Consider the Bernoulli Process that tracks the downtime of a machine daily. The probability that the machine breaks in a given day is 0.25. a. What is the probability that the machine is broken on the 5th day? b. If during the first three days, the machine is running smoothly, what is the probability that it breaks on the 4th day? c. Today is Day 8 and the machine is down, what is the expected number of days before it breaks again? d. What is the probability that the machine breaks for the 5th time on the 20th day. e. What is the probability that the machine is down 5 times between Day 11 and Day 20 (10 days, inclusive)? f. What is the probability that it is down from Day 7 to Day 12? g. If a complete machine overhaul is performed on the machine after it breaks 4 times, what is the probability that the machine will be overhauled within the first 15 days?
Bernoulli Process Example As a way to motivate students to study their lessons, a professor posts a question once a week, and he gives a $1 prize to the first who submits a correct answer. Unfortunately, the questions are difficult and only two students actively participate in this initiative. Students A and B can correctly answer the question in a given week with probability 0.2 and 0.15, respectively. Assume independence. a. What is the probability that a question is correctly answered? b. If the contest runs for 20 weeks, what is the expected cost of this initiative to the professor? c. If all that get the correct answer are given $1, what is the expected cost of this initiative to the professor?
Bernoulli Process Example The probability that a sales representative works outside the office is 0.6 in a given day. If he works outside, the probability that he meets a client is 0.8. Assume that his schedule in a day is independent of other days. a. What is the probability that in a given day, he works outside to meet a client? b. What is the expected number of days before he works outside again to meet a client? c. In a 20-day work month, what is the probability that he works to meet a client at least 15 times? d. If during five consecutive workdays, he works in the office, what is the probability that he spends the next five workdays working outside but not meeting clients?
Bernoulli Process Homework Two housemates, A and B, rent a house, though they rarely go there. The visiting patterns of the housemates are modelled by independent Bernoulli Processes with pA = 0.3 and pB = 0.4 (probability of staying in the house in a given night). Each of the housemates leaves an empty can of soda (for disposal) every night he stays in the house. a. What is the probability that these housemates meet for the 3rd time on the 8th night? b. In a 30-day month, what is the probability that the house was not empty in at least 25 nights? c. What is the probability that in a 30-day month, they meet for at most 8 days?