Student T distribution is a widely used statistic distribution in the financial
ID: 3304987 • Letter: S
Question
Student T distribution is a widely used statistic distribution in the financial analysis industry. Very often, we get a sample of data set, and need to decide whether the data sample is following Student T distribution or not. In this project, you will be asked to develop two programs. The first program is used to generate a data sample that follows Student T distribution. The second program is used to verify the data sample generated by the first program is indeed following Student T distribution.
1. Programs need to be generated through R Studio.
2. You also need to write a report to explain how your code is designed and what tests you have done to verify the code is correct. Submitting only source code without a report will not be accepted
PLEASE include the code and make it as simple as possible. Thanks!
Explanation / Answer
1. R codes :
for(i in 0:99)
{
x=rnorm(500, 0, 1)
tt[i] = 500 * (mean(x)) / sd(x)
}
tt #sample from student's t-distribution
2. t.test(tt, 499)