L4h - The mean Comparing mean and median The standard...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: The mean Comparing mean and median The standard deviation (sd) Comparing the sd and the iqr MATH1005 Statistics Lecture 4 M. Stewart School of Mathematics and Statistics University of Sydney The mean Comparing mean and median The standard deviation (sd) Comparing the sd and the iqr Outline The mean Comparing mean and median The standard deviation (sd) Comparing the sd and the iqr The mean Comparing mean and median The standard deviation (sd) Comparing the sd and the iqr The mean • A very important numerical summary is the (arithmetic) mean: if a dataset consists of n values, its mean, or average value is the ratio sum of the values n . There are other “mean”s in mathematics (e.g. geometric, harmonic, etc.) but we shall not meet them. • The mean generally enjoys very nice theoretical properties (as we shall see in the prob. section of the course). The mean Comparing mean and median The standard deviation (sd) Comparing the sd and the iqr Sigma notation • The ratio sum of the values n is a slightly cumbersome way to express a mean. A more compact way is via Sigma-notation: . • A shorthand for the sum of a given sequence of values x 1 , x 2 , . . . , x n is ( x 1 + x 2 + ··· + x n ) = n X i =1 x i (read this as “sum of x i where i runs from 1 to n ”). The letter i here plays the rˆ ole of the index of summation . • We adopt the convention that the mean of x 1 , x 2 , . . . , x n is denoted ¯ x , the mean of y 1 , y 2 , . . . , y m is denoted ¯ y , etc. Thus we can write the mean of the x i ’s as ¯ x = ∑ n i =1 x i n = 1 n n X i =1 x i . The mean Comparing mean and median The standard deviation (sd) Comparing the sd and the iqr Computing the mean using R • There is an R function mean() . If a dataset is stored in R as a vector named x , then mean(x) gives its mean. • Note there are also functions sum() and length() . Thus for a vector x , mean(x) is the same as sum(x)/length(x) . • Consider dataset 1 from the text: > d1 [1] 2 2 4 4 4 5 2 4 7 7 4 7 5 2 8 6 7 4 3 4 3 3 2 4 2 5 4 2 8 [30] 6 3 6 6 10 8 3 5 6 4 4 7 9 5 2 7 4 4 2 4 4 4 3 5 6 5 4 1 4 [59] 2 6 4 1 4 7 3 2 3 5 8 2 9 5 3 9 5 5 2 4 3 4 4 1 5 9 3 4 4 [88] 6 6 5 4 6 5 5 4 3 5 9 6 4 4 4 5 10 4 4 3 8 3 2 1 4 1 5 6 4 [117] 2 3 3 3 3 7 4 5 1 8 5 7 9 5 8 9 5 6 6 4 3 7 4 4 7 5 6 3 6 [146] 7 4 5 8 6 3 3 4 3 7 4 4 4 5 3 8 10 6 3 3 6 5 2 5 3 11 3 7 4 [175] 7 3 5 5 3 4 1 3 7 2 5 5 5 3 3 4 6 5 6 1 6 4 4 4 6 4 4 2 5 [204] 4 8 6 3 4 6 5 2 6 6 1 2 2 2 5 2 2 5 9 3 5 6 4 6 5 7 1 3 6 [233] 5 4 2 8 9 5 4 3 2 2 11 4 6 6 4 6 2 5 3 5 7 2 6 5 5 1 2 7 5 [262] 12 5 8 2 4 2 1 6 4 5 1 2 9 1 3 4 7 3 6 5 6 5 4 4 5 2 7 6 2 [291] 7 3 5 4 4 5 4 7 5 4 8 4 6 6 5 3 3 5 7 4 5 5 5 6 10 2 3 8 3 [320] 5 6 6 4 2 6 6 7 5 4 5 8 6 7 6 4 2 6 1 1 4 7 2 5 7 4 6 4 5 [349] 1 5 10 8 7 5 4 6 4 4 7 5 4 3 1 6 2 5 3 3 3 7 4 3 7 8 4 7 3 [378] 1 4 4 7 6 7 2 4 5 1 3 12 4 2 2 8 7 6 7 6 3 5 4 > mean(d1) [1] 4.68 > sum(d1) [1] 1872 > length(d1) [1] 400 > sum(d1)/length(d1) [1] 4.68 The mean Comparing mean and median The standard deviation (sd)...
View Full Document

This note was uploaded on 08/28/2011 for the course SCIENCE 1002 taught by Professor Pu during the Three '11 term at University of New South Wales.

Page1 / 19

L4h - The mean Comparing mean and median The standard...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online