# Statistics ProjectProblem: Consider one way of modeling a problem. Say you have

Statistics ProjectProblem: Consider one way of modeling a problem. Say you have a device and in any given year, there is a 1 in 6 chance that the device will fail. One question is, “On average, how long will it be before such a device fails?” This sort of problem is what will be modeled and analyzed here.The problem above can be modeled as follows: Roll a normal fair six-sided die. Rolling a 1 will count as “fail”. Anything else will count as “not-fail”. The random variable we will use will beX = # of rolls required until a 1 is rolled = “time until failure”This is a random variable, so in each experiment (for each device), this will produce a value. For example, if we roll , then X = 5 (we count the final roll). Part 1 [Excel] (Empirical Analysis): Simulate 20 repetitions of obtaining a value for X, that is, roll until a 1 is rolled, record the result and repeat this 20 times. For example, if you roll , then record 4 since 4 rolls were required. You can complete this using a die or simulating using Excel, Python, or some other option, e.g., Random.org.•Record your rolls and counts.•Compute the mean and standard deviation of your values for X. •Given the modeling problem we started with, interpret the mean and standard deviation you found in terms of how many years are expected before the device fails. Excel might be used for this part as it makes the calculations, recording of data, etc. very simple. However, it is not required.Part 2 [Excel] (Theoretical Analysis – Approximations): Compute approximations to expected value, variance, and standard deviation of the random variable X. See the additional notes for discussion on these computations, in brief: •P(X=i) = the probability of rolling something other than a 1 (i-1)-times, then rolling a 1 on the ith throw. Make a table for the first 20 values: i12…20TotalsP(X=i)P(X=1)P(X=2)…P(X=20)∑20i=1P(X=i)i⋅P(X=i)1⋅P(X=1)2⋅P(X=2)…20⋅P(X=20)∑20i=1i⋅P(X=i)i2⋅P(X=i)12⋅P(X=1)22⋅P(X=2)…202⋅P(X=20)∑20i=1i2⋅P(X=i)
Use this table to computeoP(X≤20)=∑20i=1P(X=i), the probability that you get the first 1 in at most 20 rolls.oAn approximation of E[X] using the first 20 values for X, namely E[X]≈∑20i=1i⋅P(X=i).oAn approximation to the variance of X using the first 20 terms. For this, use E[X2]≈∑20i=1i2⋅P(X=i) and then use this and the above to get a rough approximation of var[X]=E[X2]-(E[X])2.oUse the preceding to approximate the standard deviation σ[X]=var[X] using the first 20 terms.Again, using Excel for this will simplify what needs to be done.•Repeat the third item of Part 1: Given the modeling problem we started with, interpret E[X] and σ[X] in terms of how many years are expected before the device fails.Part 3 [Written] (Theoretical Analysis – Exact Computations – (Optional)): Compute the expected value, variance, and standard deviation of the random variable X. See the additional notes for discussion on these computations, in brief: •(Expected Value) E[X]=∑∞i=1i⋅P(X=i) •(Variance) var[X]=E[(X-E[X])2]=E[X2]-(E[X])2 •(Standard Deviation) σ[X]=var[X] Hint: For computing these without directly manipulating the infinite summations that appear in the definitions of E[X] and var[X], let A be the event that a 1 is rolled on the first throw and A’ be the complementary event, namely, that a 1 is not rolled on the first throw. It is clear that E[X│A’]=E[1+X]=1+ E[X] since what is rolled after the first roll is just like starting over. It is also clear that E[X│A]=1. The Law of Total Expectation (see notes) gives:E[X]=E[X│A]⋅P(A)+E[X│A’]⋅P(A’)=P(A)+(1+E[X])⋅(1-P(A))This makes it quite simple to find E[X]. A similar “trick” can be used to find E[X2], here you will use E[X2│A’]=E[(1+X)2]
A))This makes it quite simple to find E[X]. A similar “trick” can be used to find E[X2], here you will use E[X2│A’]=E[(1+X)2]=E[1+2X+X2]=1+2E[X]+E[X2]. Again, the Law of Total Expectation gives:E[X2]=E[X2│A]⋅P(A)+E[X2│A’]⋅P(A’) 