MATH 5 9 MATH 5 9 Problem. Suppose we flip a fair coin once and observe either T for tails or H for heads. Let X denote the random variable that equals when we observe tails and equals when we observe heads. This is called a Bernoulli random variable. a Make a table of the PDF of X and calculate EX and VarX. Solution: We have the following PDF table of X : The expected value is: EX = x PrX = x + =. The variance is: VarX = + =. b Now suppose that we flip a fair coin twice. We will observe one of four events: TT, TH, HT, or HH. Let X be the random variable that counts the number of heads we observe. So, X can take the values, or. Redo part a for this new random variable. Solution: We have the following PDF table of X : The expected value is: The variance is: VarX = EX = x PrX = x + + + + =. =. Page of
MATH 5 9 c Let X be the random variable that counts the number of heads we observe after three successive flips of a fair coin. Redo part a for this new random variable. Solution: We have the following PDF table of X : The expected value is: EX = + x PrX = x + + =. The variance is: VarX = + + + + =. d Do you notice any patterns in your calculations? Make a guess for the pdf table, the expectation and the variance of X, the random variable that counts the number of heads we observe after four successive flips of a fair coin, and then verify your guess by direct computation. Solution: We have the following PDF table of X : The expected value is: EX = 6 + x PrX = x 6 6 + + + =. 6 Page of
MATH 5 9 The variance is: VarX = + + 6 + + + =. 6 Problem 5. Recall the example of rolling a six-sided die. This is an example of a discrete uniform random variable, so named because the probability of observing each distinct outcome is the same, or uniform, for all outcomes. Let Y be the discrete uniform random variable that equals the face-value after a roll of an eight-sided die. The die has eight faces, each with number through. Calculate EY, VarY, and StdDevY. Solution: We have the following PDF table of Y : The expected value is: EY = x PrY = x 5 6 7 x PrY = x = x = 9 = 9. x= x= The variance is: VarY = x EY PrY = x = x 9 = =. x= x= The standard deviation is: StdDevY = VarY = =. Page of
MATH 5 9 Problem 9. Are the following functions PDF s? { x x if < x < a fx = if otherwise. b fx = Solution: fx is not a PDF because it fails the property that fx for all x R. In fact, for any < x <, we have that x > being an even power, but x <. So, for any < x <, For example, f = <. { x if x if otherwise.. fx = x x <. Solution: fx is a PDF because it satisfies the following two properties: If x, then fx = x, and if x >, then fx =, trivially. fx for all x R. Observe that we may rewrite fx in more explicit form as: + x if < x < fx = x if < x < if otherwise. So, fx dx =. fx dx = + x dx + = x + x + x dx x x = + + =. c fx = { π cosπx if x < if otherwise. Page of
MATH 5 9 Solution: fx is a PDF because it satisfies the following two properties: If x, then π πx π, which means that cosπx. Therefore, fx = π cosπx for x. If x >, then fx = trivially. fx for all x R. We have that: fx dx = fx dx =. π cosπx dx = sinπx = sin π sin π = + =. d fx = { if x if otherwise. Solution: fx is not a PDF because it fails to satisfy the property that. In fact, we have that: fx dx = dx fx dx = = x = =. fx dx =. Problem. What is the CDF of the density function π + x? Page 5 of
MATH 5 9 Solution: Recall that given a PDF fx, we can find the CDF as follows: F x = x a a a ft dt x a π + t dt π arctan t x a π arctan x π arctan a = π arctan x +. the CDF of the given density function is F x = π arctan x + for any x R. Problem 5. Show that px = e x on x R is a PDF. + e x Solution: To show that px is a PDF, we need to verify the following two properties: We observe that e x > being an exponential function, and +e x > being an even power for all x R. We have that: px = px dx = e x > for all x R. + e x px dx + px dx, if both improper integrals on the right hand side converge. Using direct substitution with u = + e x, and du = e x dx, we get: e x + e x dx = u du = u + C = + e x + C px dx = px dx lim a a b px dx = + =. px dx = lim + a e x a a + e = a, px dx + e x b + e b =, Page 6 of
MATH 5 9 So, px dx =. Therefore, px is a PDF. Problem 9. Let Z be a standard normal random variable the classic bell curve, given by the density: φx = π e x. Verify that EZ =. Solution: We have that: EZ = xφx dx = xφx dx + xφx dx, if both improper integrals on the right hand side converge. Using direct substitution with u = x and du = x dx to find an antiderivative of xφx, we get: xφx dx = xe x dx = e u du = e u + C = e x + C π π π π xφx dx = xφx dx lim a a b xφx dx = EZ = π + π =. lim e x a=, a π π xφx dx e x b =, π π Therefore, EZ =, as desired. Problem. Expectations and variances need not be finite. random variable given by the PDF: px =, for x R. π + x Let X be a Cauchy a Prove that EX does not exist i.e. the expectation is infinite. Page 7 of
MATH 5 9 Solution: We have that: EX = xfx dx = xfx dx + xfx dx, if both improper integrals on the right hand side converge. Using direct substitution with u = + x and du = x dx to find an antiderivative of xfx, we get: x xfx dx = π + x dx = π u du = ln u + C = π π ln + x + C Since xfx dx = lim a a xfx dx = lim a xfx dx diverges, the improper integral xfx dx also diverges. Therefore, the expectations EX does not exist. π ln + x a= lim a π ln + a = Problem. Let px = β e x β with parameter β. for x <, β >, an exponential random variable a Show that this density integrates to. Solution: We have that: px dx =, as desired. px dx = x β e b β dx x β e e x β b β dx e b β + =. b Calculate PrX, EX and StdDevX, for the exponential random variable X. Page of
MATH 5 9 Solution: We have that: PrX = = px dx x β e b PrX = e β. β dx x β e e x β b β dx e b β + e β Using integration by parts with u = x, du = dx, and dv = e x β dx, v = βe x β, we find that the expected value is: EX = = xpx dx x β xe β dx b x β xe β dx xe x β βe x β be b β βe b β + + β using L Hopital s Rule EX = β. b To find StdDevX, we first compute VarX as follows: VarX = = b x EX px dx = β x β e x β dx β x e x β xe x β + βe x β dx β x e x β xe x β + βe x β dx Using integration by parts twice on the first summand and integration by parts once Page 9 of
MATH 5 9 on the second summand, we get the following antiderivative of the integrand: b VarX β x e x β xe x β + βe x β dx β e x β x e x β b β e b β b e b β + β + using L Hopital s Rule VarX = β. Therefore, StdDevX = VarX = β = β, since β >. x R. Problem. Let X be a Laplace random variable given by the PDF: px = e x for a Verify that px is in fact a valid PDF. Solution: px is a valid PDF because it satisfies the following two properties: For any real number x, we have that e x being an exponential function. px = e x for all x R. Observe that we may rewrite px in more explicit form as: { px = ex if x < e x if x So, px dx = a a a ex dx + a = + =. px dx =. e x dx if both integrals converge b ex dx + lim e x dx ex a + lim e x b ea + lim e b Page of