Starting from:

$25

FE542 -HW1 - Solved

Problem 1 (10pt)
An urn contains three type A coins and two type B coin. When a type A coin is flipped, it comes up heads with probability 1/3, whereas a type B coin is flipped, it comes up heads with probability 2/3. A coin is randomly chosen from the urn and flipped. Given that the flip landed on heads, what is the probability that it was a type B coin?
Problem 2 (15pt)
In R create a report in pdf format using RMarkdown (or, if you choose to use Python instead, create a Jupyter notebook) to:
(i)    Generate 100 observations from a normal distribution with mean 2 and variance 7.
(ii)    Compute the sample mean, standard deviation, skewness and kurtosis (if excess kurtosis state that clearly).
(iii)    Generate a Q-Q plot of the observations from (i) versus the standard normal distribution. Describe your plot in no more than 3 sentences.
Problem 3 (35pt)
In R create a report in pdf format using RMarkdown (or, if you choose to use Python instead, create a Jupyter notebook) to:
(i) Download daily price data for January 1, 2017 through December 31, 2020 of Microsoft stock from Yahoo Finance. You may use the quantmod package in R for this purpose. (ii) Generate a plot of the closing prices and of daily log returns.
(iii)    Compute the sample mean, standard deviation, skewness and kurtosis (if excess kurtosis state that clearly) of the daily log returns.
(iv)    Perform the Jarque-Bera Normality test (with 5% significance level) for daily log returns and interpret your results. Compare your result a visualization from a Q-Q plot.
(v)    Compute and plot the lag-1 through lag-10 autocorrelation of the daily log returns.
(vi)    Test if the lag-5 autocorrelation is non-zero (with 5% significance level). Interpret your results.
1
(vii)    Perform the Ljung-Box test to test if the first 2, first 5, and first 8 lagged autocorrelations are non-zero (with 5% significance level). Interpret your results.

More products