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;
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
@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...
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
Hypothesis testing is the use of statistics to determine the probability that a given hypothesis is true.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.