Download presentation
Presentation is loading. Please wait.
Published byLydia Watson Modified over 6 years ago
1
Graphics with r A statistical tool for high school maths
By: Jade Write, Garth Lo Bello, Andrew Roberts, Prue Tinsey and Tania Young
2
Why Should We Use R? Using R, students have access to open source, professional quality, software Unlike Excel, this program requires knowledge of computing language Simple code can be provided by a teacher for the students to use with their own data. Not having “built in functions,” students have the chance to see more of what is involved in statistical procedures. R can perform all the tasks Excel can, but provided many more enhanced abilities, is free and is also used by professional statisticians.
3
Syllabus Outcomes
5
THE TASK Students will be asked to collect data from the classroom
Examples could include hours spent studying vs. Other activities, their height, the time it takes them to complete homework, etc. Then the students will run R using code given by their teacher and produce relevant graphical displays for interpreting their findings. Teachers who are not comfortable using R, can get their students to complete these activities in excel and still gain the same results
6
Example 1: Hours spent on various activities Suppose a student spends:
5 hours at school 3 hours with friends 1 hour doing homework 2 hours working at a job 1 hour travelling 8 hours sleeping 4 hours watching TV
7
R - code x <- c(5, 3, 1, 2, 1,8,4) pie(x, main="Hours of Student Life", col=rainbow(length(x)), labels=c("School","Friends","Homework", "Job", "Travel", "Sleep", "TV")) labels <- round(x/sum(x) * 100, 1)) x_labels <- paste(labels, "%", sep="") pie(x, main="Daily Hours as Percent of Day", col=rainbow(length(x)), labels=x_labels,) legend("bottomleft", c("School","Friends","Homework","Job","Travel","Sleep", "TV"), cex=0.9,bty="n",fill=rainbow(length(x)))
8
The student is asked to produce a pie chart with legend to represent their
daily lifestyle.
9
With excel
10
Now let’s look at the normal distribution
Suppose students compile data regarding the amount of time per Day they spend on homework in minutes. Ex: 20, 25, And the teacher asks the student to use R to represent this data in A histogram that shows the mean. R can do this rather simply
13
A normal curve fitted To a sample of 100 With R, simply change one
number and students can see how sample size affects the shape
14
What if you have student’s measure their own heights
and want them to analyse that? You could have them first collect the heights of all The students in the class..... Then compare the results when the separate the heights of boys From girls This could spark a discussion about how certain displays Can be more illustrative than others And why, in statistics, knowing your target population has great importance.
15
RESULTS ALL STUDENTS: Min. 1st Qu. Median Mean 3rd Qu. Max.
BOYS Min. 1st Qu. Median Mean 3rd Qu. Max. GIRLS Min. 1st Qu. Median Mean 3rd Qu. Max.
17
Example in Excel This links to a video that demonstrates this activity step by step in excel
18
CONFUSED OR WORRIED ABOUT USING A PROGRAM THAT REQUIREs CODE?
There are thousands of free examples online
19
SUMMARY R is a free program that not only does everything excel does
but also provides the ability for the student to see the steps involved by avoiding built in functions. This enhances learning and allows for creativity while at the same time providing students the chance to learn a piece of Software statisticians ACTUALLY use Writing code can be daunting at first, but a simple Google search provides numerous scripts that can be amended to fit any task The R website also provides free help and downloads at:
20
QUESTIONS??????
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.