联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> javajava

日期:2019-08-04 11:18

A. We are interested in understanding the power of Kolmogorov-Smirnov (KS) and Shapiro-Wilk (SW) tests for testing the hypothesis that data is coming from normal distribution. To calculate the power of a test using simulation, we need to

assume a distribution under an alternative hypothesis,  

assume the alternative is true

simulate a sample of size n from the alternative distribution

determine whether the test statistic based on this sample would reject the null hypothesis of normality

repeat the simulation many times (thousands) and see in what proportion of simulations we see the correct outcome – that, is rejection. That proportion is the estimate of probability of rejection given that the alternative is true; i.e. it is the estimate of the power.

Conduct this exercise for KS and SW tests, for sample sizes of n=30 and n=100 and for the following alternative distributions: Log-Normal(0,1), t-distribution with 3 degrees of freedom, t-distribution with 20 degrees of freedom. Comment on the results


版权所有:留学生程序网 2020 All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。