Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MA 581

Problem Set 2

Summer 1 2023

INSTRUCTIONS

Solve the following problems and upload a PDF containing your work to Gradescope before the start of class on Monday 6/5. You are allowed to work with any of your classmates and use any resources found in your textbook or online, as long as your writeup is your own. You will receive full credit for correctness as well as showing all your work (do not just put down the nal answer to a problem unless this is explicitly asked for). Even if you do not ultimately have the correct answer, showing your work will yield you significant partial credit. If any question is labeled with a  (P), it will solely be graded on a complete attempt rather than correctness. As always, feel free to ask me any questions that arise!

Problem 1

You randomly select 3 integers from 1-10.  Assume you are sampling with replacement, so you could possibly select multiple of the same integer (e.g.  {10,10,2} or {5,8,5}).  What is the probability that all three integers sum exactly to 7?  Assume selecting each integer is equally likely.

Problem 2

Would the following experiments/measurements qualify as discrete random variables? Why or why not (one sentence is sufficient)?

(a) Randomly selecting a number from [0, 1] (typical computer random number generator) (b) Test scores on a midterm exam, rounded to the nearest integer.

(c) Responses on a survey on human eye color from a random sample.

Problem 3 (P)

In this problem we will explore the properties of the Probability Mass Function (PMF). Let X be a discrete random variable, and pX (x) its PMF.

(a) Recall that pX (x) : R ! [0, 1] (the PMF is a function from the real numbers to [0,1]),

and that R is an uncountable set.  Why then, in words, can we still use the PMF to characterize a discrete random variable?

(b) Formalize your answer in part (a) mathematically by proving the statement: {x 2 R | pX (x)  0}   is a countable set.

(c)  In words, explain why necessarilyPx pX (x) = 1 .

(d)  Prove the statement in part  (c) mathematically, using the fact that P(⌦) = 1 .

Problem 4

Let X be a discrete random variable with PMF:

pX (x) = ( 

(a)  Verify that this PMF satisfies all three necessary properties (nonnegativity, countability, exhaustion) .

(b)  Consider the random variable Y = |X| .  What is the PMF pY (y)?

Problem 5

In a certain population, the number of colds a person gets in a year has a Poisson(3) distri- bution .  A new anti-cold drug lowers λ from 3 to 0 .75 and is e↵ective for 8 out of 10 people . It is important to note that the λ only changes from 3 to 0.75 if it is e↵ective for an individual. After a year with the drug in circulation to the entire population, one

person was selected at random and was found to only have gotten one cold during the year . Given the result for this individual, what is the probability that the drug was e↵ective for this person?  (Hint:  apply Bayes’ theorem)

Problem 6

Consider X ⇠ Geom(p) .

(a)  Write out in words the interpretation of the geometric distribution PMF formula (think about the two di↵erent terms and the exponent) .

(b)  In  order  for  a  discrete  random  variable  to  have  nite  expectation  (E(X)   <  1), we  claimed  in  class  that  the  series  of  its  tail  probabilities  must  converge,  that  is, P P(X  > n)  < 1 .   For  a  geometric  distribution,  what  does  the  event  X  > n for  all  n’  mean  in  words?    (Hint:  think  of  the  geometric  distribution  as  the  “first success” distribution)

(c)  Using the fact that for a geometric distribution, P(X > n) = (1− p)n , determine E(X) using the sum of tail probabilities formula .  Why does this result make sense intuitively relative to the parameter p?

(For problem 7 you will need the excel le on Blackboard)

For the next problem we will work with an excel spreadsheet to explore some concepts related to sampling discrete random variables. The sheet will run on excel’s built in random number generator. In order to rerun’ or refresh’ the sheet, just enter any value into a random cell. Each time you do this and hit enter, the sheet will refresh.

Problem 7

In this problem we will explore the relationship between the variance, covariance, and cor- relation of two random variables,  as well as verify excel’s variance algorithm.   Let X  ⇠ Bernoulli(p), and Y be a fair dice roll (6-sided).

(a) Fill out columns L and M in order to complete the variance analysis of Y . I have done

out X for you use this to familiarize yourself with the basic functions and syntax of excel. You only need to ll in cells that are lled with the color yellow.

(b)  Compute the theoretical variance of Y , Var(Y), by hand, using E(Y) = 3.5.  Input

this value into cell O7.

(c) Look at the variance error for Y in cell O10.  How does this compare to the variance error for X in cell F10?  Why do you think this is?  Make sure to refresh the random number generators a few times to get a good sense of this relationship.

(d) Now turn your attention to the data below cell H36.  Here we will study the covari- ance and correlation of these two random variables.  First, using the covariance and variances computed by excel,  compute the correlation coefficient using the formula p =  and enter the value into cell I47.  This should equal cell H47 to verify that excel is computing the correlation the same as we are.

(e) Without performing any computations, what should we theoretically expect the co- variance and correlation of X and Y to be? Enter these values into cells I39 and J47, respectively.

(f) Look at the covariance and correlation error (cells H42 and H50). Why do we get the results that we do? How can we improve this?

Problem 8 (P)

In this problem we will prove a key property of variance Var(X) = E[(X − E(X))2] for a discrete random variables with equally likely outcomes:

(a)  Assume that X is a discrete random variable with n equally likely outcomes {xk }k(n)=1 . Write the series definition of variance using the formulation in the problem statement .

For your analysis, define µ := E(X) =Pk(n)=1 xk P(X = k) =  Pk(n)=1 xk .

(b)  Now  let  Y  be  a  di↵erent  discrete  random  variable  with  m equally  likely  outcomes {yj }, with m not necessarily equal to n.   Using the series definition found in part (a), prove the quadratic’ property of variance:  for discrete random variables X,Y and constants a,b 2 R,

Var(aX + bY) = a2 Var(X)+ b2 Var(Y)+2abCov(X,Y) .

Hint: it may help to rst write out Var(X) and Var(Y) in series notation rst .  Since you will ultimately take a variance of a combination of two di↵erent random variables, you will need to apply a double sum .  Think about how to simplify this double sum in order to get the terms you want!

Problem 9

Compute the expected value and variance of the following random variables explicitly from their respective PMFs:

(1)  Sn  =Pk(n)=1 Xk , where Xk  ⇠ Bernoulli(p) for all k .

(2)  Y  ⇠  Binomial(n,p) .   Note:  this  is  a  very  challenging  problem .   Try  to  expand  out the  ✓ ◆k(n) term, cancel some terms in the factorial, and then nd a way to put it back together into combination notation .

What do you observe about the two answers? What might this indicate about the relationship between Sn  and Y?