Continuous Assessment 2!

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Continuous Assessment 2!

I simulated 10,000 samples of size n=100 from a symmetric Cauchy distribution with median =0,
for 50 different values of p in the interval 0.01p0.5. Monte Carlo approximations of the biases
and standard error are shown in Figure 1. I came to the conclusion that the bias isnt always
positive or negative, seeing as 19 of the bias results are positive and 31 negative, and, with the
exception of p=0.01 it is very close to the median value of 0 for all values of p. The value of p
appears not to affect the bias. On the other hand, we can see from Figure 2. that as p increases,
the standard error decreases exponentially with it having a significantly small value when p=0.5,
where the standard error is at its smallest. !

Figures 3. shows the approximation of the power functions of the two test statistics after 10,000
samples of size n=10 and at intervals of 0.01 between values of 02. We can see that, although
both have a similar shape, the t-test is more probable to reject the null hypothesis at lower values
of than the sign function. The t-test will almost certainly reject H0 when is about 1.25, where as
the sign test reaches the same point when is about 1.75.!

Figure 4. shows a repeat of the previous section, but with a Cauchy distribution. Here, the sign test
constantly has a significantly higher power through all values of , however its not as powerful as
with the normal distribution. If I didnt know the distribution, I would choose the sign test as the two
tests are relatively similar for the normal distribution, but it is significantly better for the Cauchy
distribution.!

Figure 1.

Figure 2.

Normal power function for t-test and sign test test

Figure 3.

- t-test!
- sign test

Figure 4.

- t-test!
- sign test

!
!
!

You might also like