STAT/MATH 394 A - PROBABILITY I UW Autumn Quarter 06 Néhémy Lim Discrete Random Variables ( Solutions Problem. The probability mass function p X of some discrete real-valued random variable X is given by the following table : (a Give the missing value p X (. x 0 3 4 p X (x 0.35 0.5 0. 0. Since p X is a probability mass function, we have that 4 x=0 p X(x =. Therefore p X ( = (p X (0 + p X ( + p X (3 + p X (4 = (0.35 + 0.5 + 0. + 0. = 0.. (b Draw the histogram of p X. 0.35 0.3 px(x 0. 0.5 0. 0. 0. 0. 0 3 4 Figure : Histogram of p X (c Give the cumulative distribution function F X of X. By definition, for any real number x, F X (x = P(X x. F X (x = y x p X (y
For instance, F X (. = y. p X(y = p X (0 + p X ( + p X ( = 0.7 In our case, X is a discrete random variable, so its cumulative distribution function F X is piecewise constant: 0 x < 0 0.35 0 x < 0.5 x < F X (x = 0.7 x < 3 0.8 3 x < 4 x 4 (d Graph F X..5 F X (x 0.5 4 x 0.5 Problem. In each case, determine the constant c so that the following functions p satisfy the conditions of being valid probability mass functions : (a For x X(Ω = {.5,,.5}, p(x = x3 c The first condition requires that p(x 0. For x =.5, p(.5 =.5 3 /c therefore c should be negative. Now if we take x =, we have that p( = 3 /c, which implies that c should be positive. We reach a contradiction. So there is no constant c for p to be a valid probability mass function. (b For x X(Ω = {n N, n }, p(x = 3 ( x c
The first condition requires that p(x 0 for all x N, n, which implies that c should be positive. The second condition is that p should sum to. Remember that if (u n is a geometric sequence, with first term u 0 = a and common ratio r, that is : u n+ = ru n with < r <, then the geometric series n 0 u n converges and its sum is : n=0 u n = a/( r. Here, the sequence defined by : u 0 = /c and u n+ = (/c u n is a geometric sequence. Therefore, if < /c <, we have that : p(x = 3 ( x = c x= x= 3 /c /c = 3 c = 3 c = c = 3 c = 5 We must verify that c > 0 and that < /c <, which is the case for c = 5. (c For x X(Ω = N, p(x = c x x! The first condition requires that p(x 0 for all x N, which implies that c should be nonnegative since x /x! > 0. The second condition is that p should sum to. Here, you recognize the exponential series, that is, for any real number a, n=0 an /n! = e a. Therefore, we have that : x=0 It is obvious that c 0. x p(x = c x! = x=0 c e = c = e = e 3
Problem 3. Calculate the probability mass function of X whose cumulative distribution function is given by : 0 b < 0 / 0 b < 3/5 b < F X (b = 4/5 b < 3 9/0 3 b < 3.5 b 3.5 By definition, for any real number x, F X (x = P(X x. Here, we notice that the distribution function F X is piecewise constant, which means that the underlying random variable X is discrete and the values that X takes on correspond to points y where F X is discontinuous, that is X(Ω = {0,,, 3, 3.5}. The probability mass function p X of X can be calculated in the following fashion : For any 0 x <, / = F X (x = y x p X(x = p X (0. So p X (0 = /. For any x <, 3/5 = F X (x = y x p X(x = p X (0 + p X (. So p X ( = 3/5 p X (0 = /0. For any x < 3, 4/5 = F X (x = y x p X(x = p X (0+p X (+p X (. So p X ( = 4/5 (p X (0 + p X ( = /5. For any 3 x < 3.5, 9/0 = F X (x = y x p X(x = p X (0 + p X ( + p X ( + p X (3. So p X (3 = 9/0 (p X (0 + p X ( + p X ( = /0. Since p X is a pmf, p X (0 + p X ( + p X ( + p X (3 + p X (3.5 =. So p X (3.5 = (p X (0 + p X ( + p X ( + p X (3 = /0. Problem 4. Two cards are chosen randomly from a standard deck of fiftytwo cards. Suppose that we win $ for each spade selected and we lose $ for each heart or diamond selected, we neither win nor lose if we pick a club. Let X denote our winnings. What are the possible values of X, and what is the probability mass function of X? If you pick cards that are either hearts or diamonds, you win X = ( dollars. This happens with probability : p X ( = P(X = = 6 ( / 5 = 5/0. If you pick one spade and the other one is either heart or diamond, you win X = dollar. This happens with probability : p X ( = ( ( 3 6 ( / 5 = 3/5. If you pick one club and the other one is either heart or diamond, you win X = dollar. This happens with probability : p X ( = ( 3 ( 6 ( / 5 = 3/5. 4
If you pick spades, you win X = 4 dollars. This happens with probability : p X (4 = ( 3 / ( 5 = /7. If you pick a spade and the other one is a club, you win X = dollars. This happens with probability : p X ( = ( 3 ( 3 / ( 5 = 3/0. If you pick clubs, you win X = 0 dollar. This happens with probability : p X (0 = ( 3 / ( 5 = /7. Problem 5. 0 candidates 5 men and 5 women take an exam and are ranked according to their scores. Assume that no two scores are alike and all 0! possible rankings are equally likely. Let X denote the highest ranking achieved by a woman. (For instance, X = if the top-ranked person is female. Find the probability mass function of X. For instance, consider that X = 4, that is that the highest ranking woman has rank 4, this implies that the 4 remaining women can have 6 possible ranks between 5 and 0. In that case, there are thus ( 6 4 ways the highest ranking woman has rank 4. We can generalize this finding and for a given i =,,..., 0, if the highest ranking woman has rank i, then there are ( 0 i 4 possible ranks for the 4 other women. Therefore, the corresponding probability is : P(X = i = ( 0 i 4 ( 0 5 Problem 6. We toss a coin n times (n. We denote by X the difference between the number of heads and the number of tails obtained. (a What are the possible values of X? For a given integer n, let H be the number of heads obtained when a coin is tossed n times. Then, T the number of tails obtained is T = n H. Therefore, the difference between the number of heads and the number of tails obtained is X = H T = H (n H = n + H. Since H can takes any values on {0,,..., n}, the possible values of X are { n, n +, n + 4,..., n 4, n, n}, that is one in every two integers between n and n, that is also all integers between n and n that are odd if n is odd, or all integers between n and n that are even if n is even. (b For n = 3, if the coin is assumed fair, give the probability mass function of X. If n = 3, X can take values 3,, and 3. X = 3 means that the coin lands 3 times on tails, which happens with probability : p X ( 3 = P(X = 3 = P({T T T } = (/ 3 = /8 X = means that the coin lands once on heads and twice on tails, which happens with probability : p X ( = P({HT T }+P({T HT }+ P({T T H} = 3 (/ 3 = 3/8 5
X = means that the coin lands twice on heads and once on tails, which happens with probability : p X ( = P({HHT } + P({HT H} + P({T HH} = 3 (/ 3 = 3/8 X = 3 means that the coin lands 3 times on heads, which happens with probability : p X (3 = P({HHH} = (/ 3 = /8 Problem 7. In a store, two customers ask a salesman advice about laptops. The first customer will purchase a laptop with probability 0.3, and independently of the first customer, the second will buy a laptop with probability 0.6. Any sale made is equally likely to be either for model A, which costs $000, or model B, which costs $500. Determine the probability mass function of X, the total dollar value of all sales. Let us define the following events : E: The salesman makes no sale, this happens with probability : P(E = ( 0.3( 0.6 = 0.8 F : The salesman makes exactly one sale, this happens with probability : P(F = 0.3 ( 0.6 + ( 0.3 0.6 = 0.54 G: The salesman makes exactly two sales, this happens with probability : P(G = 0.3 0.6 = 0.8 In addition, we denote A the event that a sale is made for model A and B the event that a sale is made for model B. We can notice that X can take 5 different values : 0, 500, 000, 500, 000 : {X = 0} is the event of $0 sales, which corresponds exactly to event E : p X (0 = P(E = 0.8 {X = 500} occurs when one sale of model B is made : p X (500 = P(F B = P(F P(B F = 0.54 / = 0.7 {X = 000} occurs when either one sale of model A is made or models B are sold: p X (000 = P(F A + P(G {BB} = P(F P(A F + P(GP({BB} G = 0.54 / + 0.8 (/ = 0.35 {X = 500} occurs when model A and model B are sold : p X (500 = P(G {AB, BA} = P(GP({AB, BA} G = 0.8 (/ = 0.09 {X = 000} occurs when two models A are sold: p X (000 = P(G {AA} = P(GP({AA} G = 0.8 (/ = 0.045. 6