Hello,
In order to compare the distribution of math scores between female and male students, we aim to plot bell curves of the results for each gender and overlay them in a single graph with a single set of axes. However, the closest we have come to accomplishing this is to get two separate graphs beside each other in one file. The "twoway" command seems unable to provide normal distribution graphs and smooth lines. How do we achieve our aim?
This is our current code:
Thank you in advance!
In order to compare the distribution of math scores between female and male students, we aim to plot bell curves of the results for each gender and overlay them in a single graph with a single set of axes. However, the closest we have come to accomplishing this is to get two separate graphs beside each other in one file. The "twoway" command seems unable to provide normal distribution graphs and smooth lines. How do we achieve our aim?
This is our current code:
Code:
clear input float(mathScoreGirl mathScoreBoy) -.16130325 . . -1.8561664 . -.3401746 -1.4119294 . -.06797387 . 1.1607436 . . .01306791 .3450717 . -3.188828 . -1.4759908 . end histogram mathScoreGirl, percent normal /* */ color(none) lwidth(none) saving(DistrGirls, replace) histogram mathScoreBoy, percent normal /* */ color(none) lwidth(none) saving(DistrBoys, replace) graph combine DistrGirls.gph DistrBoys.gph, ycommon /* */ saving(DistrComp, asis replace)
Comment