BookmarkSubscribeRSS Feed
Miah
Obsidian | Level 7

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
SuryaKiran
Meteorite | Level 14

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

 

FYI: http://www.math.wpi.edu/saspdf/stat/chap67.pdf

Thanks,
Suryakiran
PaigeMiller
Diamond | Level 26

@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
art297
Opal | Level 21

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

 

Justin_Allison
Calcite | Level 5

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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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