Correct way to formulate and test T-distribution hypotheses

18 Views Asked by At

Suppose you have a sample of observations:

sample = [-0.38, -0.35, -0.66, -0.45, -0.42, 
          -0.09, -0.50, -0.37, -0.54, -0.32]

The correlation between "x" and "y" is about 0.-48 in country "z". We want to determine if country "V" follows the same pattern.

This is an ambiguous problem I made up just because I am confused about the work we are doing. My first question is about developing hypotheses. I'm supposing given the nature of this question that:  $$H_0 : \mu = -0.48$$Is this correct or would the null hypothesis rather be something like $$H_0 : \mu \neq -0.48?$$ I'm more inclined to believe the latter is the "alternative hypothesis", but to me the logic is a bit confusing.

Part 2 lmao

The second thing I am confused about is if by chance someone got the hypotheses mixed up (treated null as if it were H_1, and vice versa).

I guess the best way to explain is to do the question as an example first:

  1. Assuming that the null hypothesis is the first (top) null hypothesis given above, we can solve at a 95% ($\alpha = 0.05$) confidence level with the following code (using R):

t = (mean(sample) - (-0.48)) / (sd(sample) / sqrt(length(sample)))

2 * (1- pt(t, df=length(sample)-1))
[out] 0.1663

Because this is above $\alpha$ we would retain the null hypothesis. I guess my question is, if someone got the null hypothesis wrong (thought of the null hypothesis as $H_0 : \mu \neq -0.48$, would the correct answer still be achievable by taking the complement of 0.1663?

Stated another way, if $p = 0.1663$ given $H_0 : \mu = -0.48$, is $p = 1 - 0.1663$ true if $H_0 : \mu \neq -0.48$?