Calculate Summary Statistics

Note:
  • Make sure to show your work when calculating the standard deviation. The method shown below is one way to show your work that produces consistent results. On assessments, not showing your work will result in a zero for the question.
  • Don’t forget to arrange the values from smallest to largest when computing the median. Count the original and your arranged data to make sure you have the same number of values in both.
  • The median will be one of the observed values if n is odd, but it will be the average of two observed values if n is even.
  • If n is odd such that the median is one of the observed values, then that value is NOT included in either “half” of the data when computing the IQR. In other words, the “lower half” of the data will end right before the median and the “upper half” of the data will end right after the median. See Data Set 2 below.
  1. Shown below
  2. > sdCalc(c(18,28,25,21,16,24))
    Demonstration of parts of a std. dev. calculation.
    
          x diffs diffs.sq
    1    18    -4       16
    2    28     6       36
    3    25     3        9
    4    21    -1        1
    5    16    -6       36
    6    24     2        4
    sum 132     0      102
    
    Mean = x-bar = 132 / 6 = 22 
    
    Variance = s^2 = 102 / 5 = 20.4 
    
    Std. Dev = s = sqrt(20.4) = 4.516636
  3. Shown above
  4. Shown below
  5. > iqrCalc(c(4,54,16,85,52,29,24,71,61,60,2))
    Median (=52) is the value in position 6.
      2 4 16 24 29 [52] 54 60 61 71 85
    
    Q1 (=16) is the value in position 3 of the lower half.
      2 4 [16] 24 29
    
    Q3 (=61) is the value in position 3 of the upper half.
      54 60 [61] 71 85
    
    **Note that the median (=52) is NOT in both halves.
  6. Shown above
  7. Shown below
  8. > iqrCalc(c(93,81,34,5,54,84,54,13,1,35,79,63,97,71))
    Median (=58.5) is the average of values in positions 7 and 8.
      1 5 13 34 35 54 [54 63] 71 79 81 84 93 97
    
    Q1 (=34) is the value in position 4 of the lower half.
      1 5 13 [34] 35 54 54
    
    Q3 (=81) is the value in position 4 of the upper half.
      63 71 79 [81] 84 93 97
  9. Shown above
  10. Range is 1 to 97.

Histograms I

  1. An individual is a state.
  2. The variable is the mean commute time for indivuals 16-years and older in states of the U.S.
  3. Mean Commute time (mins) is a quantitative, continuous variable.
  4. 51
  5. 2
  6. 25
  7. 26-28

Frequency and Percentages Tables

Should be performed by hand to match results below

  1. Frequency Table
  2. group
        Belgian Tervuren Bouvier Des Flandres               Collie                Corgi 
                       1                    4                    4                    5 
    Old English Sheepdog                 Puli             Shepherd    Shetland Sheepdog 
                       5                    3                   11                    5 
  3. Percentage Table
  4. > percTable(tbl,digits=1)
    group
        Belgian Tervuren Bouvier Des Flandres               Collie                Corgi 
                     2.6                 10.5                 10.5                 13.2 
    Old English Sheepdog                 Puli             Shepherd    Shetland Sheepdog 
                    13.2                  7.9                 28.9                 13.2 
  5. Bar Chart
  6. Shepherds were the most common herding group winners in the Westminster Kennel Club championships winning 28.9% of the time over the last 36 years

Bar Chart I

  1. A Northland College student.
  2. Categorical, nominal.
  3. Frequency table is below.
  4.      Love     Money Pregnancy     Other 
           45         1         0         4 
  5. Percentage table is below.
  6.      Love     Money Pregnancy     Other 
           90         2         0         8