Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can someone help me figure out how to do this in Microsoft Excel? Create a sampl

ID: 3172069 • Letter: C

Question

Can someone help me figure out how to do this in Microsoft Excel?

Create a sample of 1000 uniformly distributed deviates x_i on (0, 1) (spreadsheet). Consider the hypothesis that the probability distribution from which the deviates were drawn is 1 + alpha (x - 0.5) for some alpha in (-1, 1). Sketch this distribution for alpha = 0.5. Show that the integral of this hypothetical distribution (any alpha) is 1 (pencil and paper). Does the hypothesis satisfy all the conditions for a probability distribution? What value of alpha is the "true" value? For alpha taking each of the values -0.5, -0.4, ... 0, 0.1, ... +0.5, calculate the log likelihood of the 11 hypotheses using a fixed set of random deviates x_i (spreadsheet). Make a graph of the results. Repeat c) four more times, each time using a new sample of deviates. How frequently was the maximum likelihood choice for alpha the true value? When it was not the true value, by how much was it off? (You might consider seeking a more precise value for alpha by calculating the (log) likelihood for more densely spaced values near the maximum or by doing a quadratic interpolation on the three highest points.) (Optional) Repeat c), d), and e) with 10,000 deviates. Is it apparent that alpha is better determined with a larger sample?

Explanation / Answer

a) You have to find 1000 uniform(0,1) on ms excel. As we know U(0,1) distribution samples must lie in the range from 0 to 1.

Thus we use the random number function in excel that we use to generate random no.s i.e, =RANDBETWEEN(1000,0,1) This would give us our desired solution.

b) now given that f1(x)=1+alpha(x-0.5)

for alpha = 0.5, we can draw the density plot very easily in R by the function:

plot(density(f1(x)))

The value of sample or xi's must lie less than or equal to 0.5 then the integral becomes 1.

Hypothesis doesnot support all the conditions of being a pdf because integral is not 1 in its full range.

c) for each of the alpha we get different values of f(xi), multiplying we get likelihood and hence we take log over it.

It can be done in excel and using the log function. But I had calculated the derivatives manually for the 11 hypothesis only by pen and paper.

d)We take different values of xi this time and repeat the above.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote