Presentation is loading. Please wait.

Presentation is loading. Please wait.

Numerical Measures. Measures of Central Tendency (Location) Measures of Non Central Location Measure of Variability (Dispersion, Spread) Measures of Shape.

Similar presentations


Presentation on theme: "Numerical Measures. Measures of Central Tendency (Location) Measures of Non Central Location Measure of Variability (Dispersion, Spread) Measures of Shape."— Presentation transcript:

1 Numerical Measures

2 Measures of Central Tendency (Location) Measures of Non Central Location Measure of Variability (Dispersion, Spread) Measures of Shape

3 Measures of Central Tendency (Location) Mean Median Mode Central Location

4 Measures of Non-central Location Quartiles, Mid-Hinges Percentiles Non - Central Location

5 Measure of Variability (Dispersion, Spread) Variance, standard deviation Range Inter-Quartile Range Variability

6 Measures of Shape Skewness Kurtosis

7 Summation Notation

8 Let x 1, x 2, x 3, … x n denote a set of n numbers. Then the symbol denotes the sum of these n numbers x 1 + x 2 + x 3 + …+ x n

9 Example Let x 1, x 2, x 3, x 4, x 5 denote a set of 5 denote the set of numbers in the following table. i12345 xixi 101521713

10 Then the symbol denotes the sum of these 5 numbers x 1 + x 2 + x 3 + x 4 + x 5 = 10 + 15 + 21 + 7 + 13 = 66

11 Meaning of parts of summation notation Quantity changing in each term of the sum Starting value for i Final value for i each term of the sum

12 Example Again let x 1, x 2, x 3, x 4, x 5 denote a set of 5 denote the set of numbers in the following table. i12345 xixi 101521713

13 Then the symbol denotes the sum of these 3 numbers = 15 3 + 21 3 + 7 3 = 3375 + 9261 + 343 = 12979

14 Measures of Central Location (Mean)

15 Mean Let x 1, x 2, x 3, … x n denote a set of n numbers. Then the mean of the n numbers is defined as:

16 Example Again let x 1, x 2, x 3, x 4, x 5 denote a set of 5 denote the set of numbers in the following table. i12345 xixi 101521713

17 Then the mean of the 5 numbers is:

18 Interpretation of the Mean Let x 1, x 2, x 3, … x n denote a set of n numbers. Then the mean,, is the centre of gravity of those the n numbers. That is if we drew a horizontal line and placed a weight of one at each value of x i, then the balancing point of that system of mass is at the point.

19 x1x1 x2x2 x3x3 x4x4 xnxn

20 10715 21 13 In the Example 100 20

21 The mean,, is also approximately the center of gravity of a histogram

22 Measures of Central Location (Median)

23 The Median Let x 1, x 2, x 3, … x n denote a set of n numbers. Then the median of the n numbers is defined as the number that splits the numbers into two equal parts. To evaluate the median we arrange the numbers in increasing order.

24 If the number of observations is odd there will be one observation in the middle. This number is the median. If the number of observations is even there will be two middle observations. The median is the average of these two observations

25 Example Again let x 1, x 2, x 3, x 3, x 4, x 5 denote a set of 5 denote the set of numbers in the following table. i12345 xixi 101521713

26 The numbers arranged in order are: 710131521 Unique “Middle” observation – the median

27 Example 2 Let x 1, x 2, x 3, x 4, x 5, x 6 denote the 6 denote numbers: 23411219648 Arranged in increasing order these observations would be: 81219234164 Two “Middle” observations

28 Median = average of two “middle” observations =

29 Example The data on N = 23 students Variables Verbal IQ Math IQ Initial Reading Achievement Score Final Reading Achievement Score

30 Data Set #3 The following table gives data on Verbal IQ, Math IQ, Initial Reading Acheivement Score, and Final Reading Acheivement Score for 23 students who have recently completed a reading improvement program InitialFinal VerbalMathReadingReading StudentIQIQAcheivementAcheivement 186941.11.7 21041031.51.7 386921.51.9 41051002.02.0 51181151.93.5 6961021.42.4 790871.51.8 8951001.42.0 9105961.71.7 1084801.61.7 1194871.61.7 121191161.73.1 1382911.21.8 1480931.01.7 151091241.82.5 161111191.43.0 1789941.61.8 18991171.62.6 1994931.41.4 20991101.42.0 2195971.51.3 221021041.73.1 23102931.61.9

31 Computing the Median Stem leaf Diagrams Median = middle observation =12 th observation

32 Summary

33 Some Comments The mean is the centre of gravity of a set of observations. The balancing point. The median splits the obsevations equally in two parts of approximately 50%

34 The median splits the area under a histogram in two parts of 50% The mean is the balancing point of a histogram 50% median

35 For symmetric distributions the mean and the median will be approximately the same value 50% Median &

36 50% median For Positively skewed distributions the mean exceeds the median For Negatively skewed distributions the median exceeds the mean 50%

37 An outlier is a “wild” observation in the data Outliers occur because –of errors (typographical and computational) –Extreme cases in the population

38 The mean is altered to a significant degree by the presence of outliers Outliers have little effect on the value of the median This is a reason for using the median in place of the mean as a measure of central location Alternatively the mean is the best measure of central location when the data is Normally distributed (Bell-shaped)

39 Review

40 Summarizing Data Graphical Methods

41 Histogram Stem-Leaf Diagram Grouped Freq Table

42 Numerical Measures Measures of Central Tendency (Location) Measures of Non Central Location Measure of Variability (Dispersion, Spread) Measures of Shape The objective is to reduce the data to a small number of values that completely describe the data and certain aspects of the data.

43 Measures of Central Location (Mean)

44 Mean Let x 1, x 2, x 3, … x n denote a set of n numbers. Then the mean of the n numbers is defined as:

45 Interpretation of the Mean Let x 1, x 2, x 3, … x n denote a set of n numbers. Then the mean,, is the centre of gravity of those the n numbers. That is if we drew a horizontal line and placed a weight of one at each value of x i, then the balancing point of that system of mass is at the point.

46 x1x1 x2x2 x3x3 x4x4 xnxn

47 The mean,, is also approximately the center of gravity of a histogram

48 The Median Let x 1, x 2, x 3, … x n denote a set of n numbers. Then the median of the n numbers is defined as the number that splits the numbers into two equal parts. To evaluate the median we arrange the numbers in increasing order.

49 If the number of observations is odd there will be one observation in the middle. This number is the median. If the number of observations is even there will be two middle observations. The median is the average of these two observations

50 Measures of Non-Central Location Percentiles Quartiles (Hinges, Mid-hinges)

51 Definition The P×100 Percentile is a point, x P, underneath a distribution that has a fixed proportion P of the population (or sample) below that value P×100 % xPxP

52 Definition (Quartiles) The first Quartile, Q 1,is the 25 Percentile, x 0.25 25 % x 0.25

53 The second Quartile, Q 2,is the 50th Percentile, x 0.50 50 % x 0.50

54 The second Quartile, Q 2, is also the median and the 50 th percentile

55 The third Quartile, Q 3,is the 75 th Percentile, x 0.75 75 % x 0.75

56 The Quartiles – Q 1, Q 2, Q 3 divide the population into 4 equal parts of 25%. 25 % Q1Q1 Q2Q2 Q3Q3

57 Computing Percentiles and Quartiles There are several methods used to compute percentiles and quartiles. Different computer packages will use different methods Sometimes for small samples these methods will agree (but not always) For large samples the methods will agree within a certain level of accuracy

58 Computing Percentiles and Quartiles – Method 1 The first step is to order the observations in increasing order. We then compute the position, k, of the P×100 Percentile. k = P × (n+1) Where n = the number of observations

59 Example The data on n = 23 students Variables Verbal IQ Math IQ Initial Reading Achievement Score Final Reading Achievement Score We want to compute the 75 th percentile and the 90 th percentile

60 The position, k, of the 75 th Percentile. k = P × (n+1) =.75 × (23+1) = 18 The position, k, of the 90 th Percentile. k = P × (n+1) =.90 × (23+1) = 21.6 When the position k is an integer the percentile is the k th observation (in order of magnitude) in the data set. For example the 75 th percentile is the 18 th (in size) observation

61 When the position k is an not an integer but an integer(m) + a fraction(f). i.e.k = m + f then the percentile is x P = (1-f) × (m th observation in size) + f × (m+1 st observation in size) In the example the position of the 90 th percentile is: k = 21.6 Then x.90 = 0.4(21 st observation in size) + 0.6(22 nd observation in size)

62 When the position k is an not an integer but an integer(m) + a fraction(f). i.e.k = m + f then the percentile is x P = (1-f) × (m th observation in size) + f × (m+1 st observation in size) x p = (1- f) ( m th obs) + f [(m+1) st obs] (m+1) st obs m th obs

63 When the position k is an not an integer but an integer(m) + a fraction(f). i.e.k = m + f x p = (1- f) ( m th obs) + f [(m+1) st obs] (m+1) st obs m th obs Thus the position of x p is 100f% through the interval between the m th observation and the (m +1) st observation

64 Example The data Verbal IQ on n = 23 students arranged in increasing order is: 8082848686899094 949595969999102102 104105105109111118119

65 x 0.75 = 75 th percentile = 18 th observation in size =105 (position k = 18) x 0.90 = 90 th percentile = 0.4(21 st observation in size) + 0.6(22 nd observation in size) = 0.4(111)+ 0.6(118) = 115.2 (position k = 21.6)

66 An Alternative method for computing Quartiles – Method 2 Sometimes this method will result in the same values for the quartiles. Sometimes this method will result in the different values for the quartiles. For large samples the two methods will result in approximately the same answer.

67 Let x 1, x 2, x 3, … x n denote a set of n numbers. The first step in Method 2 is to arrange the numbers in increasing order. From the arranged numbers we compute the median. This is also called the Hinge

68 Example Consider the 5 numbers: 101521713 Arranged in increasing order: 710131521 The median (or Hinge) splits the observations in half Median (Hinge)

69 The lower mid-hinge (the first quartile) is the “median” of the lower half of the observations (excluding the median). The upper mid-hinge (the third quartile) is the “median” of the upper half of the observations (excluding the median).

70 Consider the five number in increasing order: 710131521 Median (Hinge) 13 Lower Half Upper Half Upper Mid-Hinge (First Quartile) (7+10)/2 =8.5 Upper Mid-Hinge (Third Quartile) (15+21)/2 = 18

71 Computing the median and the quartile using the first method: Position of the median: k = 0.5(5+1) = 3 Position of the first Quartile: k = 0.25(5+1) = 1.5 Position of the third Quartile: k = 0.75(5+1) = 4.5 710131521 Q 2 = 13Q 1 = 8. 5 Q 3 = 18

72 Both methods result in the same value This is not always true.

73 Example The data Verbal IQ on n = 23 students arranged in increasing order is: 80 82 84 86 86 89 90 94 94 95 95 96 99 99 102 102 104 105 105 109 111 118 119 Median (Hinge) 96 Lower Mid-Hinge (First Quartile) 89 Upper Mid-Hinge (Third Quartile) 105

74 Computing the median and the quartile using the first method: Position of the median: k = 0.5(23+1) = 12 Position of the first Quartile: k = 0.25(23+1) = 6 Position of the third Quartile: k = 0.75(23+1) = 18 80 82 84 86 86 89 90 94 94 95 95 96 99 99 102 102 104 105 105 109 111 118 119 Q 2 = 96Q 1 = 89 Q 3 = 105

75 Many programs compute percentiles, quartiles etc. Each may use different methods. It is important to know which method is being used. The different methods result in answers that are close when the sample size is large.

76 Announcement Assignment 2 has been posted this assignment has to be handed in and is due Friday, January 22 This assignment requires the use of a Statistical Package (SPSS or Minitab) available in most computer labs. Instructions on the use of these packages will be given in the lab today

77 Box-Plots Box-Whisker Plots A graphical method of displaying data An alternative to the histogram and stem-leaf diagram

78 To Draw a Box Plot Compute the Hinge (Median, Q 2 ) and the Mid-hinges (first & third quartiles – Q 1 and Q 3 ) We also compute the largest and smallest of the observations – the max and the min The five number summary min, Q 1, Q 2, Q 3, max

79 Example The data Verbal IQ on n = 23 students arranged in increasing order is: 80 82 84 86 86 89 90 94 94 95 95 96 99 99 102 102 104 105 105 109 111 118 119 Q 2 = 96Q 1 = 89 Q 3 = 105 min = 80max = 119

80 The Box Plot is then drawn Drawing above an axis a “box” from Q 1 to Q 3. Drawing vertical line in the box at the median, Q 2 Drawing whiskers at the lower and upper ends of the box going down to the min and up to max.

81 Box Lower Whisker Upper Whisker Q2Q2 Q1Q1 Q3Q3 minmax

82 Example The data Verbal IQ on n = 23 students arranged in increasing order is: min = 80 Q 1 = 89 Q 2 = 96 Q 3 = 105 max = 119 This is sometimes called the five-number summary

83 7080 90100110120130 Box Plot of Verbal IQ

84 70 80 90 100 110 120 130 Box Plot can also be drawn vertically

85 Box-Whisker plots (Verbal IQ, Math IQ)

86 Box-Whisker plots (Initial RA, Final RA )

87 Summary Information contained in the box plot Middle 50% of population 25%

88 Advance Box Plots

89 An outlier is a “wild” observation in the data Outliers occur because –of errors (typographical and computational) –Extreme cases in the population We will now consider the drawing of box- plots where outliers are identified

90 To Draw a Box Plot we need to: Compute the Hinge (Median, Q 2 ) and the Mid-hinges (first & third quartiles – Q 1 and Q 3 ) The difference Q 3 – Q 1 is called the inter- quartile range (denoted by IQR) To identify outliers we will compute the inner and outer fences

91 The fences are like the fences at a prison. We expect the entire population to be within both sets of fences. If a member of the population is between the inner and outer fences it is a mild outlier. If a member of the population is outside of the outer fences it is an extreme outlier.

92 Inner fences

93 Lower inner fence f 1 = Q 1 - (1.5)IQR Upper inner fence f 2 = Q 3 + (1.5)IQR

94 Outer fences

95 Lower outer fence F 1 = Q 1 - (3)IQR Upper outer fence F 2 = Q 3 + (3)IQR

96 Observations that are between the lower and upper inner fences are considered to be non-outliers. Observations that are outside the inner fences but not outside the outer fences are considered to be mild outliers. Observations that are outside outer fences are considered to be extreme outliers.

97 mild outliers are plotted individually in a box-plot using the symbol extreme outliers are plotted individually in a box-plot using the symbol non-outliers are represented with the box and whiskers with –Max = largest observation within the fences –Min = smallest observation within the fences

98 Inner fences Outer fence Mild outliers Extreme outlier Box-Whisker plot representing the data that are not outliers

99 Example Data collected on n = 109 countries in 1995. Data collected on k = 25 variables.

100 The variables 1.Population Size (in 1000s) 2.Density = Number of people/Sq kilometer 3.Urban = percentage of population living in cities 4.Religion 5.lifeexpf = Average female life expectancy 6.lifeexpm = Average male life expectancy

101 7.literacy = % of population who read 8.pop_inc = % increase in popn size (1995) 9.babymort = Infant motality (deaths per 1000) 10.gdp_cap = Gross domestic product/capita 11.Region = Region or economic group 12.calories = Daily calorie intake. 13.aids = Number of aids cases 14.birth_rt = Birth rate per 1000 people

102 15.death_rt = death rate per 1000 people 16.aids_rt = Number of aids cases/100000 people 17.log_gdp = log 10 (gdp_cap) 18.log_aidsr = log 10 (aids_rt) 19.b_to_d =birth to death ratio 20.fertility = average number of children in family 21.log_pop = log 10 (population)

103 22.cropgrow = ?? 23.lit_male = % of males who can read 24.lit_fema = % of females who can read 25.Climate = predominant climate

104 The data file as it appears in SPSS

105 Consider the data on infant mortality Stem-Leaf diagram stem = 10s, leaf = unit digit

106 median = Q 2 = 27 Quartiles Lower quartile = Q 1 = the median of lower half Upper quartile = Q 3 = the median of upper half Summary Statistics Interquartile range (IQR) IQR = Q 1 - Q 3 = 66.5 – 12 = 54.5

107 lower = Q 1 - 3(IQR) = 12 – 3(54.5) = - 151.5 The Outer Fences No observations are outside of the outer fences lower = Q 1 – 1.5(IQR) = 12 – 1.5(54.5) = - 69.75 The Inner Fences upper = Q 3 = 1.5(IQR) = 66.5 + 1.5(54.5) = 148.25 upper = Q 3 = 3(IQR) = 66.5 + 3(54.5) = 230.0 Only one observation (168 – Afghanistan) is outside of the inner fences – (mild outlier)

108 Box-Whisker Plot of Infant Mortality Infant Mortality

109 Example 2 In this example we are looking at the weight gains (grams) for rats under six diets differing in level of protein (High or Low) and source of protein (Beef, Cereal, or Pork). –Ten test animals for each diet

110 Table Gains in weight (grams) for rats under six diets differing in level of protein (High or Low) and source of protein (Beef, Cereal, or Pork) Level High ProteinLow protein Source Beef Cereal PorkBeefCerealPork Diet 123456 7398949010749 1027479769582 1185696909773 10411198648086 8195102869881 10788102517497 100821087274106 877791906770 11786120958961 11192105785882 Median103.087.0100.082.084.581.5 Mean100.085.999.579.283.978.7 IQR24.018.011.018.023.016.0 PSD17.7813.338.1513.3317.0411.05 Variance229.11225.66119.17192.84246.77273.79 Std. Dev.15.1415.0210.9213.8915.7116.55

111 High ProteinLow Protein Beef Cereal Pork

112 Conclusions Weight gain is higher for the high protein meat diets Increasing the level of protein - increases weight gain but only if source of protein is a meat source

113 Next topic: Numerical Measures of Variability Numerical Measures of Variability


Download ppt "Numerical Measures. Measures of Central Tendency (Location) Measures of Non Central Location Measure of Variability (Dispersion, Spread) Measures of Shape."

Similar presentations


Ads by Google