Chi Squared Hypothesis 2 Tailed Test

I have reviewed the previous questions and answers regard the Chi Squared test and can not find the answer to the following:
Test Statistic = (v1-v2)*((v_hat)/v)
C.I. = ((v1-v2), alpha/2) < Test Statistic < ((v1_v2), 1-(alpha/2))
Where, v1 = integer variable 1 v2 = integer variable 2
(v1 - v2 = degrees of freedom)
v_hat = variable 3 v = variable 4 alpha = Significance Level

댓글 수: 1

Jay
Jay 2015년 7월 27일
편집: Jay 2015년 7월 27일
I am using this:
[h_1] = vartest(aposteriori*4,1,'Tail','both','Alpha',0.01)
Will this do a 2 tail test testing both the upper and lower tails, ie 0.01/2 and 1 - 0.01/2 (99% Confidence Level)?

댓글을 달려면 로그인하십시오.

답변 (1개)

Brendan Hamm
Brendan Hamm 2015년 7월 27일

0 개 추천

Yes, the syntax you are using is testing both the upper and lower tails using the values you specified (0.01/2 and 1-0.01/2). So you are testing the null hypothesis that aposteriori*4 comes from a normal distribution with variance equal to 1, and supplying the alternative hypothesis that the data is from a normal distribution with a different variance. I should note there is no need to specify the 'Tail' property as 'both' is the default value.
Also your definition of the Chi-squared variance test is wrong. It is actually
(n-1)(sHat/sTest)^2,
where n is your sample size, sHat the sample estimate of the standard deviation and sTest is the hypothesized standard deviation.

댓글 수: 2

Jay
Jay 2015년 7월 27일
편집: Jay 2015년 7월 27일
Thanks Brendan,
I am using the test statistic y = (n-u)*sHat/s_assumed ~ Chi^2,(n-u)
Where sHat is the estimated variance, s_assumed is the assumed variance (AKA expected), n is the number of observations and u is the number of unknowns.
Brendan Hamm
Brendan Hamm 2015년 7월 27일
Great, It was not clear from your original post that this is what you meant, so I figured I would clarify. I should point out in the case of a test for the variance, u = 1.

댓글을 달려면 로그인하십시오.

카테고리

질문:

Jay
2015년 7월 27일

댓글:

2015년 7월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by