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
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.