/* basicmath.sas */ title2 'Explore math data with elementary tests'; %include '/home/u1407221/441s24/SAS06/ReadLabelMath.sas'; /* It's not the primary question, but are marks better on the precalculus items of the diagnostic test, or the calculus items? There are 9 precalculus and 11 calculus questions; convert to percentages. */ data extra; set explore; diff = (100 * precalc/9) - (100 * calc/11); label diff = 'Percentage correct: Precalc minus calc'; proc means n mean std t probt clm; title3 'Are pre-calculus questions easier?'; var diff; /* Do the following quantitative variables have a significant linear relationship with grade? What percent of the variation does each explain? * High school GPA * High school Calculus mark * High school English mark * Number precalculus correct on diagnostic test * Number calculus correct on diagnostic test * Total number correct on diagnostic test */ proc corr nosimple; title3 'Correlations between quantitative variables'; var grade hsgpa hscalc hsengl precalc calc totscore; proc reg plots=none; title3 'Give an equation for predicting calculus grade from HS GPA'; model grade = hsgpa; proc glm; title3 'Do average marks differ significantly in the three courses?'; class class; model grade = class; /* Also, what proportion of the variation in grade is explained by course? */ proc freq; title2 'Do students in the three courses have different outcomes?'; tables class * (passed outcome) / nocol nopercent chisq; proc glm plots=none; title3 'Do the three courses attract different kinds of student?'; class class; model hsgpa hscalc hsengl precalc calc totscore = class; means class; proc glm; title2 'Is there a sex dfference in average marks?'; class sex; model grade = sex; means sex; /* Also, what proportion of the variation in grade is explained by sex? */ proc ttest; title2 'Could we conclude NO sex difference?'; class sex; var grade; /* Includes confidence interval for difference between means. */ proc glm; title2 'Do average marks depend on mother tongue?'; class tongue; model grade = tongue; means tongue; /* Also, what proportion of the variation in grade is explained by mother tongue? */ proc glm; title2 'Do average marks depend on ethnic background?'; class ethnic; model grade = ethnic; means ethnic; means ethnic / tukey bon scheffe; /* Also, what proportion of the variation in grade is explained by ethnic background? */ run; quit;