I need to calculate Chi-Square test for One Pop. Variance
my data is Ho variance less 25 h1 variance larger than 25 sample deviation= 9.98
I do not know which sas code to use to get the chi square
The formula for the chi-square test is given here: https://www.real-statistics.com/chi-square-and-f-distributions/one-sample-hypothesis-testing-varianc...
You would program this in a SAS data step, using the CDF function (actually, I think you need 1-CDF), as shown here.
I would like to see the SAS code
the data is 20 observations
I believe that in SAS you use the proc freq command
can you provide me with the code
thank you
PROC FREQ does Chi Square tests for categorical data, this is not what you have. You're testing the variance for a continuous distribution, but the test statistic has a Chi Square distribution. PROC FREQ is not the correct procedure here.
Here's an example on calculating the CI for the STD and Variance, which can help you with your hypothesis testing.
For the Chi-Square Test specifically, you can use the VarTest macro here:
https://support.sas.com/kb/25/024.html
@ralphbenno wrote:
I need to calculate Chi-Square test for One Pop. Variance
my data is Ho variance less 25 h1 variance larger than 25 sample deviation= 9.98
I do not know which sas code to use to get the chi square
the answer given does not work for Ha variance less than 25. the macro does not work.
I need sas code for doing chi-square test for one population variance.
thank you
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.