organizing quantitative data - math 130, elements of...

35
Organizing Quantitative Data MATH 130, Elements of Statistics I J. Robert Buchanan Department of Mathematics Fall 2019

Upload: buicong

Post on 14-Aug-2019

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Organizing Quantitative DataMATH 130, Elements of Statistics I

J. Robert Buchanan

Department of Mathematics

Fall 2019

Page 2: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Objectives

At the end of this lesson we will be able to:I organize discrete data in tables,I construct histograms of discrete data,I organize continuous data in tables,I construct histograms of continuous data,I draw stem-and-leaf plots,I draw dot plots,I identify the shape of a distribution,I draw time-series graphs.

Page 3: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Organizing Discrete Data

I If there are relatively few values of the variable, we maytreat them the same as qualitative data.

I If there are many values of the variable, we createcategories called classes using intervals of numbers.

Page 4: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Few Values of the Variable

ExampleConstruct a frequency and relative frequency distribution for thefinal exam scores of students in an earlier semester of MATH130.

68 75 76 75 72 7173 75 74 77 71 7675 75 76 72 69 7272 73 68 67 77 73

Remark: the grades range from 67 to 77 (only 11 differentpossible grades) so we treat the data as if it were qualitative.

Page 5: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Few Values of the Variable

ExampleConstruct a frequency and relative frequency distribution for thefinal exam scores of students in an earlier semester of MATH130.

68 75 76 75 72 7173 75 74 77 71 7675 75 76 72 69 7272 73 68 67 77 73

Remark: the grades range from 67 to 77 (only 11 differentpossible grades) so we treat the data as if it were qualitative.

Page 6: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Solution

Grade Frequency Relative Frequency67 1 0.041768 2 0.083369 1 0.041770 0 0.000071 2 0.083372 4 0.166773 3 0.125074 1 0.041775 5 0.208376 3 0.125077 2 0.0833

Total 24 1.0000

Page 7: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Histogram

DefinitionA histogram is constructed by drawing rectangles for eachclass of data. The height of each rectangle is the frequency orrelative frequency of the class. The width of each rectangle isthe same and the rectangles touch each other.

Page 8: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Example

Construct a frequency histogram of the final exam gradespresented earlier (repeated below for convenience).

68 75 76 75 72 7173 75 74 77 71 7675 75 76 72 69 7272 73 68 67 77 73

Page 9: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Histogram of Frequencies

67 68 69 70 71 72 73 74 75 76 77Grades

1

2

3

4

5

Freq.

Page 10: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Histogram of Relative Frequencies

67 68 69 70 71 72 73 74 75 76 77Grades

0.05

0.10

0.15

0.20

Rel. Freq.

Page 11: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Continuous DataContinuous data must be organized into intervals of numberscalled classes.

I The lower class limit of a class is the smallest valuewithin the class.

I The upper class limit of a class is the largest value withinthe class.

I The class width is the difference between two consecutivelower class limits.

I A table is open ended if the first class has no lower classlimit or the last class has no upper class limit.

There is no “best” choice of class width. We usually pick aclass width which produces 5–12 classes.

class width ≈ maximum − minimumnumber of classes

Page 12: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Continuous DataContinuous data must be organized into intervals of numberscalled classes.

I The lower class limit of a class is the smallest valuewithin the class.

I The upper class limit of a class is the largest value withinthe class.

I The class width is the difference between two consecutivelower class limits.

I A table is open ended if the first class has no lower classlimit or the last class has no upper class limit.

There is no “best” choice of class width. We usually pick aclass width which produces 5–12 classes.

class width ≈ maximum − minimumnumber of classes

Page 13: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Example

Consider the following data representing the length in minutesof final round tennis matches.

50.4 78.2 72.8 56.3 73.1 67.289.1 41.7 87.1 77.3 40.1 56.666.0 74.1 67.9 53.8 89.3 84.668.4 53.7 78.0 80.9 78.9 78.1

Construct a frequency and relative frequency table for the datawith five categories.

Page 14: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Solution (1 of 2)

It will be helpful if we start by sorting the data in ascendingorder.

40.1 41.7 50.4 53.7 53.8 56.356.6 66.0 67.2 67.9 68.4 72.873.1 74.1 77.3 78.0 78.1 78.278.9 80.9 84.6 87.1 89.1 89.3

Page 15: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Solution (2 of 2)

The minimum and maximum times are respectively 40.1 and89.3 respectively. Thus if we choose the first lower class limit tobe 40 and the class width to be 10, we can summarize the dataas follows.

Class Frequency Relative Frequency40–49.9

2 0.0833

50–59.9

5 0.2083

60–69.9

4 0.1667

70–79.9

8 0.3333

80–89.9

5 0.2083

Page 16: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Solution (2 of 2)

The minimum and maximum times are respectively 40.1 and89.3 respectively. Thus if we choose the first lower class limit tobe 40 and the class width to be 10, we can summarize the dataas follows.

Class Frequency Relative Frequency40–49.9 2

0.0833

50–59.9 5

0.2083

60–69.9 4

0.1667

70–79.9 8

0.3333

80–89.9 5

0.2083

Page 17: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Solution (2 of 2)

The minimum and maximum times are respectively 40.1 and89.3 respectively. Thus if we choose the first lower class limit tobe 40 and the class width to be 10, we can summarize the dataas follows.

Class Frequency Relative Frequency40–49.9 2 0.083350–59.9 5 0.208360–69.9 4 0.166770–79.9 8 0.333380–89.9 5 0.2083

Page 18: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Histogram of Continuous Data

To create a histogram of the data we label the lower class limitson the horizontal axis and the class frequency (or relativefrequency) on the vertical axis.

ExampleConstruct a histogram of the tennis match data using thefrequencies just determined in the previous table.

Page 19: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Frequency Histogram

50 60 70 80 90Time

2

4

6

8

Freq.

Page 20: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Relative Frequency Histogram

50 60 70 80 90Time

0.05

0.10

0.15

0.20

0.25

0.30

0.35

Rel. Freq.

Page 21: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Stem-and-Leaf Plots

1. The stem of the graph will consist of the digits to the left ofthe right-most digit. The leaf of the graph will be therightmost digit.

2. Write the stems in a vertical column in increasing order.Draw a vertical line to the right of the stems.

3. Write each leaf corresponding to the stems to the right ofthe vertical line.

4. Write the leaves in ascending order.

Page 22: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Example

Round the tennis match times to the nearest whole minute anddraw a stem-and-leaf plot.

First round the data given earlier.

40 42 50 54 54 5657 66 67 68 68 7373 74 77 78 78 7879 81 85 87 89 89

The stems are the tens digits of the data and the leaves arethe ones digits of the data.

Page 23: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Example

Round the tennis match times to the nearest whole minute anddraw a stem-and-leaf plot.First round the data given earlier.

40 42 50 54 54 5657 66 67 68 68 7373 74 77 78 78 7879 81 85 87 89 89

The stems are the tens digits of the data and the leaves arethe ones digits of the data.

Page 24: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Solution

4 025 044676 67887 334788898 15799

Page 25: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Splitting Stems

We may use more than one stem for a class of data.

2 83 4594 6667795 0112334555667799996 0012344445556788888999997 0001223333333444445666678998 00113337778899 11123444

2 83 4594 6667795 01123345 555667799996 0012344446 5556788888999997 0001223333333444447 5666678998 00113337778899 11123444

Page 26: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Dot Plots

A dot plot is drawn by placing each observation horizontally inincreasing order and placing a dot above the observation eachtime it is observed.

ExampleDraw a dot plot of the final exam grades presented earlier andrepeated below for convenience.

68 75 76 75 72 7173 75 74 77 71 7675 75 76 72 69 7272 73 68 67 77 73

Page 27: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Solution

67 68 69 70 71 72 73 74 75 76 77

Page 28: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Shapes of Distributions

We may describe variables through the shape of its histogram.I uniform, frequency of each value of the variable is evenly

spread across the values of the variable.I bell-shaped, highest frequency occurs in the middle and

frequencies tail off to the left and right.I skewed right, tail to the right of the peak is longer than the

tail to the left of the peak.I skewed left, tail to the left of the peak is longer than the

tail to the right of the peak.

Page 29: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Uniform Distribution

0.2 0.4 0.6 0.8 1

5

10

15

20

25

30

35

Page 30: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Bell-Shaped Distribution

7 8 9 10 11 12 13

20

40

60

80

Page 31: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Distribution Skewed Right

1 2 3 4 5 6

50

100

150

Page 32: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Distribution Skewed Left

1 2 3 4

20

40

60

80

Page 33: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Time-Series Graphs

If the value of a variable is measured at different points in time,the data are referred to as time-series data.

DefinitionA time-series plot is obtained by plotting the time in which avariable is measured on the horizontal axis and thecorresponding value of the variable on the vertical axis. Linesegments are then drawn connecting the points.

Page 34: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Example

Draw a time-series plot of housing permits issued according tothe following table.

Housing PermitsYear (in thousands)2000 1592.32001 1636.72002 1747.72003 1889.22004 2070.12005 2155.32006 1838.92007 1398.42008 905.42009 583.02010 592.9

Page 35: Organizing Quantitative Data - MATH 130, Elements of ...banach.millersville.edu/~bob/math130/QuantitativeData/main.pdf · Organizing Quantitative Data MATH 130, Elements of Statistics

Time-Series Plot

2000 2002 2004 2006 2008 2010Year

500

1000

1500

2000

2500Permits