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

The two sample t-test is basal on the t-distribution and is exact when sigma_1 =

ID: 3236864 • Letter: T

Question

The two sample t-test is basal on the t-distribution and is exact when sigma_1 = sigma_2. However, when sigma_1 notequalto sigma_2 the use of a t-distribution with v degrees of freedom is an approximation. Here, v = (s^2_1/n_1 + s^2_2/n_2)^2/(s^2_1/n^1)^2/n_1 - 1 + (s^2_2/n^2)^2/n_2 - 1. In this question, you are to carry out simulation experiments that explore the validity of this approximation. Take n_1 = 10, n_2 = 10, and assume (under H_0) that X_i ~ N (0, 0.7^2) and Y_i ~ N (0, 1.3^2). (a) Calculate, v = (sigma^2_1/n_1 + sigma^2_2/n_2)^2/(sigma^2_1/n_1)^2/n_1 - 1 + (sigma^2_2/n_2)^2/n_2 - 1 (b) Generate 10^6 replicates of the random variable T = X - Y/Squareroot S^2_1/n_1 + S^2_2/n_2. Note that each generation of T requires 10 X's and 10 Y's. (c) Compare the 0.8, 0.9 and 0.95 quantiles of a t-distribution with v degrees of freedom and the empirical quantiles obtained from the simulation. (d) Explain your results and comment about this simulation experiment. Are there other ways to carry it out?

Explanation / Answer

Ans:a) v=0.047524/0.00344022=13.81

b) Now generate the 10 X's and Y's

t=-1.343

df=13.8=14

p-value=0.200640

we have to compare it with 0.2,0.1 and 0.05 significance levels

p-value>=0.05, 0.1,0.2 so we can accept at 0.05,0.1 and 0.2 significance levels that x and y have equal means.

z x y 1 0.25 0.175 0.325 2 0.5 0.35 0.65 3 0.75 0.525 0.975 4 1 0.7 1.3 5 1.25 0.875 1.625 6 1.5 1.05 1.95 7 1.75 1.225 2.275 8 2 1.4 2.6 9 2.25 1.575 2.925 10 2.5 1.75 3.25 std dev 0.529839 0.983986 mean 0.9625 1.7875