Obsidian | Level 7

Hypothesis test

I am trying to perform a hypothesis test to determine if more than 10% of cereals are manufactured by Post. Significance level=0.10.

Here it is my code and the data set:

`DATA cereal;INFILE "/folders/myfolders/cereal.txt"DLM=',' FIRSTOBS=2 DSD MISSOVER;INPUT Name :\$50. Manufacturer \$ Type \$ Calories Protein Sodium Fiber Carbohydrates Sugars Potassium Vitamins Weight Cups;RUN;PROC PRINT DATA=cereal;RUN; PROC TTEST DATA= Cereal;VAR Manufacturer;RUN;`

4 REPLIES 4
Meteorite | Level 14

Re: Hypothesis test

CLASS statement contains the variable that distinquishes the groups being compared.
VAR statement specifies the response variable to be used in calculations.

Thanks,
Suryakiran
Diamond | Level 26

Re: Hypothesis test

@Miah wrote:

I am trying to perform a hypothesis test to determine if more than 10% of cereals are manufactured by Post. Significance level=0.10.

PROC TTEST will not perform the hypothesis test you are describing, nor will it even compute the percent of cereals manufactured by POST.

PROC FREQ will compute the percent of cereals manufactured by each manufacturer. The BINOMIAL option in the TABLES statement will perform the desired hypothesis test. http://documentation.sas.com/?docsetId=procstat&docsetTarget=procstat_freq_examples04.htm&docsetVers...

--
Paige Miller
Opal | Level 21

Re: Hypothesis test

The question you have to ask yourself is "have you met the prerequisites" for whatever analysis you want to do.

Do your 77 records represent a random sample of all cereal types (e.g., see https://en.wikipedia.org/wiki/List_of_breakfast_cereals )?

The simple question of whether Post cereals represent at least 10% of those represented in your data, a simple proc freq shows that to be true. But statistics (other than descriptive) can't (I don't think) provide what you're looking for unless you meet the assumptions of the analysis you want to do.

Art, CEO, AnalystFinder.com

Calcite | Level 5

Re: Hypothesis test

Hypothesis testing is the use of statistics to determine the probability that a given hypothesis is true.

Discussion stats
• 4 replies
• 941 views
• 0 likes
• 5 in conversation