<<

SA §z Dynamic and Stochastic Models Fall z§Ë’ Uhan

Lesson h. Conditional Review

Ë Joint distributions

● Let X and Y be random variables

● X and Y could be dependent: for example,

○ X = service time of ûrst customer in the shop ○ Y = delay (time in queue) of second customer in the shop

● If we want to determine the probability of an event that depends both on X and Y, we need their joint distribution

● _e joint cdf of X and Y is:

○ Note: the textbook by Nelson uses Pr{X = x, Y = y} to mean Pr{X = x and Y = y}

● Suppose X and Y are discrete random variables: takes values , , ... ○ X aË az takes values , , ... ○ Y bË bz

● _e joint probability mass function (pmf) of discrete random variables X and Y is:

● We can obtain the marginal pmfs as follows:

● We can deûne a joint probability density function (pdf) and marginal pdfs for continuous random variables in a similar fashion

Ë Example Ë. _e Markov Company sells three types of replacement wheels and two types of bearings for in-line skates. Wheels and bearings must be ordered as a set, but customers can decide which combination of wheel type and bearing type they want.

Let V and W be random variables that represent the type of bearing and wheel, respectively, in replacement sets ordered in the future. Based on historical data, the company has determined the probability that each wheels-bearings pair will be ordered:

W Ë z h pVW Ë z/˧ Ë/˧ Ë/˧ V z Ë/z§ Ç/z§ h/z§

a. What is Pr{V = Ë and W = z}? b. What is Pr{V = Ë}? c. What is Pr{W = z}?

z Independence

● Let’s consider events of the form {X ∈ A} and {Y ∈ B}, for example:

○ A = (þ, z6] ⇒ {X ∈ A} =

○ B = { , 6h} ⇒ {Y ∈ B} =

○ {X = a} can be written as {X ∈ A} with

○ {Y ≤ b} can be written as {Y ∈ B} with

● Two random variables X and Y are independent if knowing the value of X does not change the probability of Y (and vice versa)

● Mathematically speaking, X and Y are independent if

z Example z. Are the random variables V and W in Example Ë independent? Why or why not?

h Conditional probability

● Conditional probability addresses the question:

How should we revise our probability statements about Y given that we have some knowledge of the value of X?

● _e conditional probability that Y takes a value in B given that X takes a value in A is:

○ _e revised probability is the probability of the joint event {Y ∈ B, X ∈ A} normalized by the probability of the conditional event {X ∈ A}

Example h. In Example Ë, what is the probability that a customer will order type z wheels, given that he or she orders type Ë bearings?

● If X and Y are independent, then:

● Let A ⊆ B. _en, if X and Y are perfectly dependent (i.e., X = Y), then:

h Conditional distributions and expectations

● Let X and Y be discrete random variables In particular, suppose takes on values , , ... ○ Y bË bz

● _e conditional probability mass function (pmf) of Y given X ∈ A is:

● _e conditional cumulative distribution function (cdf) of Y given X ∈ A is:

● _e conditional of g(Y) given X ∈ A is:

Example . In Example Ë, ûnd the conditional pmf of W given that V = Ë.

Example þ. In Example Ë, suppose that the proût from selling type Ë, type z, and type h wheels is ¤ , ¤@, and ¤Ë§, respectively. Find the expected proût from wheels, given that the customer ordered type Ë bearings.

þ

● We can write a joint probability as the product of a conditional probability and a marginal probability:

● Using this, we can also decompose a marginal probability into the products of conditional and marginal

_e law of total probability. Suppose is a discrete taking values , , .... _en: ● X aË az

● We have a similar law when X is a continuous random variable

Example @. In Example Ë, the conditional pmf of W given that V = z is:

b Ë z h Ë/Ëz Ç/Ëz h/Ëz pWSV=z(b)

Use this with your answer to Example to ûnd Pr{W = z}.

þ Example 6. Let Y be a random variable that models the time for you to get promoted from O-h to O- in years. _e cdf of Y is ⎧ − Ë a ⎪Ë − þ if ≥ § ( ) = ⎨ e a FY a ⎪§ otherwise ⎩⎪ (Note this is the cdf of an exponential random variable with mean þ). a. What is the probability that promotion takes longer than þ years, given that it has already been h years? b. What is the probability that promotion takes less than @ years, given that it has already been years?

@ @ Exercises

Problem Ë. Professor I. M. Right oen has his facts wrong. Let X be a random variable that represents the number of questions he is asked during one class, and let Y be the number of questions that he answers incorrectly during one class. _e joint pmf of and is: pXY X Y

Y § Ë z pXY Ë Ë/h § § X z Ë/ Ë/Ëz § h h/Ë@ Ë/Ç Ë/ Ç a. What is the probability that Professor Right answers all questions correctly during one class? b. What is the probability that Professor Right answers Ë question incorrectly during one class, given that he is asked two questions? c. Explain why Ë, z §. pXY ( ) =

Problem z. _e Simplex Company uses three machines to produce a large batch of similar manufactured items. z§% of the items were produced by machine Ë, h§% by machine z, and þ§% by machine h. In addition, Ë% of the items produced by machine Ë are defective, z% by machine z are defective, and h% by machine h are defective. Suppose you select Ë item at random from the entire batch. a. Deûne the random variable as the machine used ( Ë, z, h ) to produce this item. Write the pmf of . M M ∈ { } pM M b. Deûne another random variable D that is equal to Ë if this item is defective, and § otherwise. Find the probability that D = Ë given M = m, for m = Ë, z, h. c. Find the probability that D = Ë; that is, the probability that the randomly selected item is defective.

Problem h. Simplex Pizza sells pizza (of course) and muõns (that’s weird). Let Z and M be random variables that represent the number of pizzas and muõns in one order, respectively. Based on historical data, the company has determined the joint pmf for and : pZM Z M

M § Ë z pZM § § §.§’ §.§@ Ë §.zþ §.ËË §.§þ Z z §.˧ §.§Ç §.§6 h §.§Ç §.§6 §.§

a. What is the conditional pmf of M, given that Z = z? b. What is the expected number of muõns in an order, given that it contains z pizzas?

c. It turns out that Pr{M = Ë} = §.hþ and Pr{M = Ë S Z = h} ≈ §.h@Ç. Based on this information, are M and Z independent? Why or why not?

6