Hypothesis test: Testing for the median given a set of numbers

186 Views Asked by At

Suppose $X_1,...,X_n$ are froma continous distribution and we test whether the median of these observations is 100 against the alternative that the median is greater than 100. Let $Y$ be the number of $X_i$'s greater than 100.

What is the distribution of $Y$ under the null hypothesis and if $n=4832$ and $Y=263$ find the p-value for this test?

For the first part I believe that the distribution of Y is $Y\sim Bin(n,p=\#greater>100/n)$. And the second part I got

$H_o:median(X_1,..X_n)=100$ vs $H_A: median(X_1,..,X_n)>100$

$Pvalue=P(Y>100)=P(\dfrac{y-482*\frac{263}{482}}{\sqrt{482*\frac{263}{482}\frac{219}{482}}}> \dfrac{100-263}{\sqrt{482*\frac{263}{482}\frac{219}{482}}})=P(Z>\dfrac{-163}{\sqrt{10.9314}})=1$. Would this be a right way of getting the p-value? I think Y follows a binomial under the $H_0$. I don't think we have use continuity correction. Thanks

1

There are 1 best solutions below

5
On BEST ANSWER

Outline: We are assuming that the null hypothesis holds, that is, that the median is $100$. We want to find out how unlikely is a result of $263$ or more test results $\gt 100$, under the hypothesis that the median is $100$. Under that hypothesis, $Y$ has binomial distribution with mean $(482)(1/2)=241$, and variance $(482)(1/4)$. (You are using the wrong $p$ for the binomial.)

The probability that such a binomial has value $\ge 263$ can be computed using the normal approximation to the binomial. Out of general caution, I would use the continuity correction.