Definition
It is a specific type of Sampling Distribution
Let be a probability function and the probability function of , then same as with the Sampling Distribution of the Mean we have:
Therefore we can get:
Normal Approximation
For a sufficiently large and , and are distributted as normal distributions. Then also
Solution Methods
Standard Deviations Known
In R:
pnorm(x, mu1 − mu2, sqrt(sd1^2/n1 + sd2^2/n2))Standard Deviations Unknown but equal
In R:
df <- n1 + n2 - 2
Sp <- sqrt(((n1-1)*S1^2 + (n2-1)*S2^2) / df)
t_val <- ((xbar1-xbar2) - (mu1-mu2)) / (Sp*sqrt(1/n1+1/n2))
pt(t_val, df=df)Standard Deviations Unknown and different
In R:
num_df <- (s1^2/n1 + s2^2/n2)^2
den_df <- ((s1^2/n1)^2 / (n1 - 1)) + ((s2^2/n2)^2 / (s2 - 1))
df <- num_df / den_df
diff_observed <- xbar1 - xbar2
mean_theoretical <- mu1 - mu2
stderr <- sqrt(s1^2/n1 + s2^2/n2)
t_val <- (diff_observed - mean_theoretical) / stderr
pt(t_val, df = df)