This is a follow-up question based on an answer Dr. Phil gave me a while back in which he suggested that I use a chi-squared test. I have not worked with such a test in over forty years. I'd like to confirm that I am using it correctly.
In essence, I have two variables presumably related by B = f(A) plus an error term. I want to show that A and B are negatively correlated without assuming anything else about their relationship. Nothing is known for certain about the behavior of the error terms, but I am assuming that they are usually small compared to f(A). I have fourteen pairs of observations of A and B (I actually have sixteen, but there are independent reasons to believe that the error terms for those observations are atypical and may be large relative to f(A).)
With respect to the observations of A and B, I have 7 cases where A is above the median while the paired B is below the median, and 7 cases where A is below the median while the paired B is above the median. So my table of actuals looks like
7, 0
0, 7
By the way, if I do not exclude the two observations, my table of actuals looks like
8, 0
0, 8
So I doubt my exclusion of observations adversely affects any conclusion.
My hull hypothesis is that A and B are independent.
On that hypothesis, the expected table for fourteen observations would look like:
3.5, 3.5
3.5, 3.5
The weighted square differences for each cell = \(\displaystyle \dfrac{(7 - 3.5)^2}{3.5} = 3.5 = \dfrac{(0 - 3.5)^2}{3.5}.
I add those up to get 14, which is a suspiciously neat result. I have only 1 degree of freedom. At the 99% level, the critical value of the chi squared statistic with one degree of freedom is 6.635 so I can reject the null hypothesis of independence.
It looks plausible to me that I can simultaneously reject any null hypothesis of positive correlation because the chi-squared statistic would be even higher in that case.
How am I doing?
Dr. Phil also suggested that I calculate the rank-difference coefficient of correlation, where I get -0.76. Does that add or subtract or do nothing in terms of hypothesis testing. If I am following what I am reading, the phi coefficient is 1, another suspiciously neat result.
Which should I use, 1 or -0.76?
Sorry for asking basic questions, but it has been a very long time since I studied this.\)
In essence, I have two variables presumably related by B = f(A) plus an error term. I want to show that A and B are negatively correlated without assuming anything else about their relationship. Nothing is known for certain about the behavior of the error terms, but I am assuming that they are usually small compared to f(A). I have fourteen pairs of observations of A and B (I actually have sixteen, but there are independent reasons to believe that the error terms for those observations are atypical and may be large relative to f(A).)
With respect to the observations of A and B, I have 7 cases where A is above the median while the paired B is below the median, and 7 cases where A is below the median while the paired B is above the median. So my table of actuals looks like
7, 0
0, 7
By the way, if I do not exclude the two observations, my table of actuals looks like
8, 0
0, 8
So I doubt my exclusion of observations adversely affects any conclusion.
My hull hypothesis is that A and B are independent.
On that hypothesis, the expected table for fourteen observations would look like:
3.5, 3.5
3.5, 3.5
The weighted square differences for each cell = \(\displaystyle \dfrac{(7 - 3.5)^2}{3.5} = 3.5 = \dfrac{(0 - 3.5)^2}{3.5}.
I add those up to get 14, which is a suspiciously neat result. I have only 1 degree of freedom. At the 99% level, the critical value of the chi squared statistic with one degree of freedom is 6.635 so I can reject the null hypothesis of independence.
It looks plausible to me that I can simultaneously reject any null hypothesis of positive correlation because the chi-squared statistic would be even higher in that case.
How am I doing?
Dr. Phil also suggested that I calculate the rank-difference coefficient of correlation, where I get -0.76. Does that add or subtract or do nothing in terms of hypothesis testing. If I am following what I am reading, the phi coefficient is 1, another suspiciously neat result.
Which should I use, 1 or -0.76?
Sorry for asking basic questions, but it has been a very long time since I studied this.\)