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

Student T distribution is a widely used statistic distribution in the financial

ID: 3741982 • 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 usd to verify the data sample generated by the first program is indeed following Student 1T distribution. 1. You can use any programming tools or languages you like. For example, C++/Java/Matlab/R 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.

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)