Docsity

Understanding Variables, Distributions, and Measures in Data Analysis, Study notes of Statistics

Toggle sidebar
bg1
1
1
Chapter 2
Descriptive Analysis and
Presentation of Single-
Variable Data
2
Variable
Quantitative
(Numerical):
quantifies an element
of a population
Nominal:
names an
element
Qualitative
(Categorical):
describes or categorizes an
element of a population
Ordinal:
incorporates an
ordered position,
or ranking
Discrete:
assumes a countable
number of values
Continuous:
assumes an
uncountable
number of values
3
Categorical (Qualitative)
Display
Frequency distribution
Relative Frequency distribution
Cumulative Relative Frequency distr ibution
Pie chart (circle graph)
Bar graph
Pareto
Summarize – None
A frequency distribution lists the number of occurrences for
each category.
This is a count of the number of individuals in each category.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b

Partial preview of the text

Download Understanding Variables, Distributions, and Measures in Data Analysis and more Study notes Statistics in PDF only on Docsity!

1

Chapter 2

Descriptive Analysis and

Presentation of Single-

Variable Data

2

Variable

Quantitative

(Numerical):

quantifies an element of a population

Nominal:

names an element

Qualitative

(Categorical):

describes or categorizes an element of a population

Ordinal:

incorporates an ordered position, or ranking

Discrete:

assumes a countable number of values

Continuous:

assumes an uncountable number of values

3

Categorical (Qualitative)

 Display

 Frequency distribution

 Relative Frequency distribution

 Cumulative Relative Frequency distribution

 Pie chart (circle graph)

 Bar graph

 Pareto

 Summarize – None

A frequency distribution lists the number of occurrences for

each category.

This is a count of the number of individuals in each category.

4

Example:

A survey was taken of a past section of STAT 104 to what their current classification was. Please note 1=Freshman, 2=Sophomore, 3=Junior, 4=Senior, 5=Other. The following data was collected. We wish to construct a frequency distribution.

4 3 3 2 2 1 2 3 2 1 1 2 4 5 3 3 2 1 3 2 4 1 1 2 3 4 2 2 1 2 1 2 1 3 2 2 1 1 4 3 4 5 1 3 4 3 2 1 1 2 2 1 1 2 1 3 3 2 1 1 1 2 1 4

Class Tally Frequency Freshman = 1 Sophomore = 2 Junior = 3 Senior = 4 Other = 5

Total

Always add the frequency to be sure that every data point was tallied.

5

The relative frequency is the proportion or percent of observations within a category and is found using the formula

( )

Re sumofallfrequencies

frequency lative Frequency=

A relative frequency distribution lists the relative frequencies of each category of data.

6

Convert the previous frequency distribution to a relative frequency distribution.

Class Tally Frequency Relative Frequency Freshman = 1 Sophomore = 2 Junior = 3 Senior = 4 Other = 5 Total

10

Another Example:

Data

 Who?

Carnivores.

 What?

Family/species

Body mass

Bite force

Diet.

Categorical

Numerical

Numerical

Categorical (herbivore,

omnivore, etc.)

11

Categorical (Qualitative)

Family Number of Species (Frequency) Canidae (dogs) 28 Felidae (cats) 33 Herpestidae (mongooses)

13

Hyaenidae (hyenas) 4 Mustelidae (badgers, otters, weasels)

38

Procyonidae (caoti, raccoons)

10

Ursidae (bears) 8 Viverridae (civits, genets)

17

Total 151

“Bite Forces and Evolutionary Adaptations to Feeding Ecology in Carnivores,” by P. Christiansen and S. Wade, Ecology, 88(2), 2007, pp. 347 – 358.

12

Quantitative (Numerical)

 Display

 Dot plot

 Stem and leaf

 Histogram

 Box plot.

 Summary

 Center

 Spread

 Position

13

Numerical (Quantitative)

Body Mass of Canidae (dogs)

(rounded to nearest kg)

Body Mass of Canidae (dogs)

(rounded to nearest kg)

Sorted

14

Body Mass (kg)

Dot Plot of Body Mass

Body Mass of Canidae (rounded to nearest kg)

1, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 8, 9, 9, 10, 10, 11, 12, 13, 22,23, 25,

15

Stem-and-Leaf Display

Body Mass (kg) of Canidae

0 | 1 |

2 | 3 |

Body Mass of Canidae (rounded to nearest kg)

1, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 8, 9, 9, 10, 10, 11, 12, 13, 22,23, 25,

Construction of a Stem-and-Leaf Plot

  1. The stem of the graph will consist of the digits to the left of the rightmost digit. The leaf of the graph will be the rightmost 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 of the vertical line. The leaves must be written in ascending order.

37 ⇒ 3 | 7

19

For Discrete or Continuous Data

We can create frequency, relative frequency and cumulative relative frequency distributions in a similar manner for discrete and Continuous data as we did for qualitative data.

Using the frequency or relative frequency distribution, we can create a histogram.

 Histogram

 A picture of the distribution of the data.  Collects values into classes.  Classes should be of equal width.  Different class choices can yield different pictures.  The height of each rectangle is the frequency or relative frequency of the class

20

Histogram

FrequencyFrequency

MeasurementMeasurement

•2 axes

•Horizontal: measurement where values of the numerical variable of interest are located

•Vertical: frequency values within each class (interval) on the horizontal axis

Note: Continuous data do not have any predetermined categories that can be used to contrast a frequency distribution; therefore, the categories must be created. Categories of data are created by using intervals of numbers called classes.

21

Constructing a Histogram

 Order data from smallest to largest using a

stem and leaf display.

 Determine classes.

 equal width  more data more classes Body Mass of^ Canidae (rounded to nearest kg)

1, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 8, 9, 9, 10, 10, 11, 12, 13, 22,23, 25,

35 BodyMass (^40122)

30 BodyMass 35 0

25 BodyMass 30 1

20 BodyMass 25 2

15 BodyMass 20 0

10 BodyMass 15 5

5 BodyMass 10 12

0 BodyMass 5 7

Class Freq

≤ <

≤ <

≤ <

≤ <

≤ <

≤ <

≤ <

≤ <

23

Histogram

2

4

6

8

10

12

Count

0 5 10 15 20 25 30 35 40

Body Mass (kg)

Distributions

Body Mass of Canidae (rounded to nearest kg)

1, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 8, 9, 9, 10, 10, 11, 12, 13, 22,23, 25,

24

Shape

 Symmetry (mirror image)

 Unimodal, flat

 Skew (mode on one side)

 Toward higher values (right)

 Toward lower values (left)

 Other

 Multiple peaks, outliers

28

Skewed to Right

5.0 5.5 6.0 6.5 7.

80 70 60 50 40 30 20 10 0

pH

Frequency

pH of Pork Loins

29

Skewed to Left

1 2 3 4 5 6 7 8 9 10

0

5

10

15

20

Flexibility Index

Frequency

Flexibility Index of Young Adult Men

30

Multiple Peaks

0.1 0.2 0.3 0.

0

5

10

15

Size (carats)

Frequency

Size of Diamonds (carats)

31

Summarizing Numerical Data

 What is a “typical” value?

 Look for the center of the distribution.

 What do we mean by “center”?

32

Measures of Center

 Central Tendency

Mean

Median

Mode

Midrange

 Measures of central tendency are numeric

values that locate, in some sense, the

middle of a data set.

33

Recall A parameter is a descriptive measure of a population. Greek letters

A statistic is a descriptive measure of a sample. Roman Characters

μ σ^2

x s^2

The arithmetic mean of a variable is computed by determining the sum of all the values of the variable in the data set, divided by the number of observations.

The population mean, μ, is computed using all the individuals in a population. The population mean is a parameter.

The sample mean, , is computed using the sample data. The sample mean is a statistic.

x

37

  1. Mode

The mode of a variable is the most frequent observation of the variable that occurs in the data set. If a data set has two values that occur with the highest frequency, we say the data are bimodal. If a data set has three or more data values that occur with the highest frequency, the data set is multimodal.

  1. Midrange

The midrange is the average of the smallest and largest data value.

( smallest largest )

midrange

38

Example

You are given the following starting salaries for five graduates from the business college at Iowa State University: 35000, 37000, 35000, 33000, 210000.

Find the mean, median, mode, and midrange.

Mean

Median

Mean = 70000

Median = 35000

39

Mode = 35000

Midrange

What would be the most appropriate measure of central tendency to report to give a good indication for future graduates about what starting salary to expect? Why?

Notice the mean is the most sensitive to extreme values, while the median is not. We say the median is resistant to extreme values.

If 210000 was 40000 instead, then the mean would be 36000 =x

X 1 = 35000, X 2 = 37000, X 3 = 35000, X 4 = 33000, X 5 = 210000.

Mode

Midrange = 121500

40

Compare the mean and median for the following distributions

41

42

46

  1. Range

The range, R, of a variable is the difference between the largest value and the smallest data value. That is,

Range = R = (Largest Data Value – Smallest Data Value)

47

Deviation about the mean

x (^) i − μ or xi − x

What would be the value if I were to add all the deviations? Why?

  1. Variance

The variance is based upon the difference between each observation and the mean. It is calculated as a mean of the squared deviations. The divisor used in the calculation of this mean is dependent upon whether we are calculating the population variance or the sample variance.

48

The population variance of a variable is the sum of the squared deviations about the population mean divided by the number of observations in the population, N.

That is, it is the mean of the squared deviations about the population mean.

The population variance is symbolically represented by σ^2.

( ) ( ) ( ) ( )

N

x x x

N

x N

N

i

i 2 2 2

2 1 1

2

2 μ μ ...^ μ

μ

σ

− + − + + −

−

=

∑

where x 1 , x 2 , … , xN are the N observations in the population and μ is the population mean.

Notice that the population variance, σ^2 , is a parameter.

49

An algebraically equivalent formula for computing the population variance is

N

N

x

x

N

i

N

i

i

∑ i

σ

where Σxi^2 means to square each observation and then sum these squared values, and (Σxi)^2 means to add all the observations and then square the sum.

50

The sample variance, s^2 , is computed by determining the sum of the squared deviations about the sample mean and dividing this result by n – 1. The formula for the sample variance from a sample of size n is

2 2 2

2 1 1

2

2

=

n

x x x x x x

n

x x

s n

n

i

i

where x 1 , x 2 , … , xn are the n observations in the sample

and xis the sample mean.

Notice that the sample variance, s^2 , is a statistic.

51

An algebraically equivalent formula for computing the sample variance is

n

n

x

x

s

n

i

n

i

i

i

where Σxi^2 means to square each observation and then sum these squared values, and (Σxi)^2 means to add all the observations and then square the sum.

Notice that the sample variance is obtained by dividing by n – 1. If we divided by n, as we would expect, the sample variance would consistently underestimate the population variance.

55

We have:

Standard Deviation:

Variance:

( ) 529. 56

2

2

− =

∑

∑

∑

x x

x

We have: x

( )

  1. 1944 8

  2. 555

8

9

650 47474

1

(^22) 2 2

= =

−

−

−

∑

∑

n

n

x x s

i i

s= s = =

56

Example: During the 2007 season (including pre and post-season), the Super Bowl XLII champions the New York Giants had a winning record of 15-9. Their point totals, for the 24 games, are listed in ascending order below. Find the range, variance and standard deviation. 10 12 13 13 13 16 16 16 17 17 20 20 21 21 21 23 24 24 31 33 35 35 35 38

Note that 524

24

1

∑^ =

i=

xi 13070.

24

1

i=

and xi

57

When to use which?

 Standard deviation

 More informative than range

 Not resistant to outliers

 Quantitative, bell-shaped symmetric data

 Use with Mean

 Range

 Less informative

 Resistant to outliers

 Quantitative, skewed data

 Use with Median

58

( μ − σ,μ+ σ)

( μ − 2 σ ,μ+ 2 σ)

( μ − 3 σ ,μ+ 3 σ)

Empirical Rule

 If a distribution is roughly bell shaped, then

 Approximately 68% of the data will lie within one

standard deviation of the mean

 Approximately 95% of the data will lie within two

standard deviations of the mean

 Approximately 99.7% of the data will lie within

three standard deviations of the mean

59

μ

60

μ − 2 σ μ

μ + 2 σ