Question
Question 1 {15 Marks} Open the data named DEMOGRAPHICS, which is found under SASHELP libraries. Perform STRATIFIED random sampling of sizes 5, 4, 2, 6,
Question 1 {15 Marks}
- Open the data named DEMOGRAPHICS, which is found under SASHELP libraries. Perform STRATIFIED random sampling of sizes 5, 4, 2, 6, 2 and 3 for the Regions AFR, AMR, EMR, EUR, SEAR and WPR, respectively.
- Give a printout of the sample that you selected with ONLY variables region, cont, id, name, isoname, pop and popAGR
- Determine the following estimates based on your sample:
- Average GNI
- Confidence interval for average GNI
- Total number of GNI
- Variance of the Total number of GNI
- 95% Confidence interval for the Total number of GNI
Question 2 {10 Marks}
A researcher wanted to investigate the impact of an intervention on smoking. In this hypothetical study, 50 participants were recruited to take part, consisting of 25 smokers and 25 non-smokers. All participants watched an emotive video showing the impact that deaths from smoking-related cancers had on families. Two weeks after this video intervention, the same participants were asked whether they remained smokers or non-smokers. Test at 5% level of significance if the intervention significantly helped to change the smoking status of the participants. The following SAS code was suggested for you to perform this hypothesis test. Assume normality of the population is violated.
data Cancer;
input Before$ After$ Count;
cards;
Smoker Smoker 20
Smoker NonSmoker 5
NonSmoker Smoker 16
NonSmoker NonSmoker 9
;
run;
procfreq data = CANCER;
weight count;
tables Before * After/agree;
run;
- How many statements are in the program? [1]
- What statistical test is performed by this code? Is it the most appropriate to perform this hypothesis test? If no, what would be the most suitable test to do so? If the correct answer is NO, you will not have to answer part C, youll get full marks [2]
- Copy this code and run it in SAS. Are there any errors that display?
If yes, what is the error? Explain what you did to fix the error [2]
If there are no errors, skip to (ii) below
- Then run the correct code and see if SAS executes all the commands. Interpret the results to perform a hypothesis test and make conclusions based on the result you find [5]
******************************************************
Question 1 {15 Marks}
- Open the data named DEMOGRAPHICS, which is found under SASHELP libraries. Perform STRATIFIED random sampling of sizes 5, 4, 2, 6, 2 and 3 for the Regions AFR, AMR, EMR, EUR, SEAR and WPR, respectively.
- Give a printout of the sample that you selected with ONLY variables region, cont, id, name, isoname, pop and popAGR
- Determine the following estimates based on your sample:
- Average GNI
- Confidence interval for average GNI
- Total number of GNI
- Variance of the Total number of GNI
- 95% Confidence interval for the Total number of GNI
Question 2 {10 Marks}
A researcher wanted to investigate the impact of an intervention on smoking. In this hypothetical study, 50 participants were recruited to take part, consisting of 25 smokers and 25 non-smokers. All participants watched an emotive video showing the impact that deaths from smoking-related cancers had on families. Two weeks after this video intervention, the same participants were asked whether they remained smokers or non-smokers. Test at 5% level of significance if the intervention significantly helped to change the smoking status of the participants. The following SAS code was suggested for you to perform this hypothesis test. Assume normality of the population is violated.
data Cancer;
input Before$ After$ Count;
cards;
Smoker Smoker 20
Smoker NonSmoker 5
NonSmoker Smoker 16
NonSmoker NonSmoker 9
;
run;
procfreq data = CANCER;
weight count;
tables Before * After/agree;
run;
- How many statements are in the program? [1]
- What statistical test is performed by this code? Is it the most appropriate to perform this hypothesis test? If no, what would be the most suitable test to do so? If the correct answer is NO, you will not have to answer part C, youll get full marks [2]
- Copy this code and run it in SAS. Are there any errors that display?
If yes, what is the error? Explain what you did to fix the error [2]
If there are no errors, skip to (ii) below
- Then run the correct code and see if SAS executes all the commands. Interpret the results to perform a hypothesis test and make conclusions based on the result you find [5]
******************************************************
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started