# Use R to solve those questions.

STA 462R Project 1

Name:_________________

Q1. (20pts) As part of Chapter 6 we learned that not all distributions have a moment generating functions.

One of them is the Cauchy distribution. See https://en.wikipedia.org/wiki/Cauchy_distribution

a)(5pts) Explain using mathematical notations/formulas, why it is not possible to derive MGF for this

distribution. Why is this distribution refer to as a “pathological” distribution?

b)(5pts) Crate a plot of Cauchy PDF for 4 different distribution with 𝑥0 = −2 and

𝛾 = 0.5; 1; 2; 3. All of these PDFs should be plotted on the same plot. Format your plot

properly, add legend inside the plot, use different colors for the density lines, etc.

c)(5pts) Create a plot of Cauchy CDFs for the same parameters given in part b) above.

d)(5pts) Reflect on this question. Elaborate on your observations and findings. Write at least 5 full

sentences in order to earn full credit. Think about the following questions as you write your reflection:

What do I observe from the plots? Does this question improve my understanding of Chapter 6 material?

What did I learn going through this exercise? Who cares about Cauchy distribution?

𝜋

𝜋

Q2. (20pts) Let X have the uniform pdf f(x)=1/π for − 2 < 𝑥 < 2 . Find the pdf of Y=tan(X). This is the
pdf of Cauchy distribution. You will derive the special case of Cauchy distribution with 𝑥0 = 0
and 𝛾 = 1 (location and scale parameters).
a)(10pts) Show all your derivations and the final solution.
b) (5pts) Write the R code to plot Cauchy density derived in a).
c) (5pts) Reflect on your findings and observations. Include a short paragraph with a minimum of 5
sentences. As you write, think about the following questions: How is this question related to Chapter 6?
How does this question improve my understanding on the topics included in Chapter 6? How is this
question related to Q1 above?
Q3. (20pts) As part of your practice problems assigned in the second week of the semester, you learned
about Weibull distribution. See Problem 6.26 in your textbook. Suppose your friend Jim majoring in
physics comes to you and ask you to help him with your understanding of the parametrization used for the
Weibull distribution. He found out that Weibull PDF on the following website
https://en.wikipedia.org/wiki/Weibull_distribution is not the same as that shown in problem 6.26 of your
textbook.
a)(5pts) Reconcile the two different parametrization methods for Weibull and explain them to your friend
Jim.
b) (5pts) Find out one application of the Weibull distribution and discuss it in a practical example. I
expect to see a minimum of 5 full sentences for full credit.
1
c) (5pts) Plot 3 PDFs and 3 CDFs of Weibull using different parameters. Provide 2 plots side by side in
one row. One plot should include 3 Weibull PDFs and the other plots should include 3 Weibull CDFs.
d) (5pts) Discuss your findings and observations in c) and provide a reflection. I expect to see a
minimum of 5 full sentences for full credit.
4.(40pts) Suppose we wish to generate a sample from the exponential (β) distribution, and only have
access to a computer which generates numbers from the skew logistic distribution. It turns out that if
X~SkewLogistic (β), then log(1+exp(-X)) is exponential (β). Show that this is true and check by
simulation that this transformation is correct. Reflect on your observations, findings, challenges, and new
learning discoveries. Your answer to this question should include derivations, simulations, plots, and the
reflection.
2