Docsity

Statistics: Sampling, Data Description, and Data Spread - Prof. Jack Morse, Study notes of Statistics

Toggle sidebar
bg1
Page 1 of 61
Chapter One – Introduction to Statistics
1.1 What is Statistics?
Statistics – The science of designing studies
and analyzing the data that those studies
produce. Statistics is the science of learning
from data.
Example – Predicting an Election Using an Exit
Poll
Page 2 of 61
1.2 We Learn about Populations using
Samples
Population – The total set of subjects in which we
are interested.
Ex. = the entire voting public
Sample – A subset of the population for whom we
have data.
Ex. = 200 randomly selected voters
Subject – entities that we measure in a study.
Ex. = each voter in the sample
Parameter – A numerical value summarizing the
population data.
Ex. = proportion of voters voting for candidate A in
the entire population
Statistic – A numerical value summarizing the
sample data.
Ex. = proportion of voters voting for candidate A in
our sample (the 200 randomly selected voters)
Page 3 of 61
Example: A college dean is interested in learning
about the average age of faculty at the college. The
dean takes a random sample of 30 faculty
members and averages their 30 ages.
Match the following:
A. population
B. sample
C. subject
D. parameter
E. statistic
__________________________________________
____ the average age of all faculty members at the
college
____ 30 randomly selected faculty members at the
college
____ a single faculty member from the sample
____ all faculty members at the college
____ the average age of the 30 randomly selected
faculty members at the college
Page 4 of 61
Symbols we use in Statistics
In the previous example, we were interested in the
average age of all faculty members at the University of
Georgia.
Whenever we are interested in an average for a full
population, there is a lower-case Greek symbol we use
to denote this value, µ. It is pronounced “mu”.
So in this previous example, we would say
µ = average age for all faculty members at UGA
Now, most of the time in real life, we will not be able to
actually calculate this value, so we try for the next best
thing. Like in the previous example, instead of trying to
find every single faculty member, we are okay with just
getting an average for 30 randomly selected faculty
members and use that as our estimate.
Whenever we have an average calculated from a sample,
like in this case, from 30 randomly selected faculty
members, there is a symbol we use for that average
from the sample, ⎯x.
So in this example, ⎯x = the average age for 30
randomly selected faculty members.
µ represents an average calculated from a full
population. ⎯x represents an average calculated from a
sample.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Statistics: Sampling, Data Description, and Data Spread - Prof. Jack Morse and more Study notes Statistics in PDF only on Docsity!

Page 1 of 61

Chapter One – Introduction to Statistics

1.1 What is Statistics?

Statistics – The science of designing studies

and analyzing the data that those studies

produce. Statistics is the science of learning

from data.

Example – Predicting an Election Using an Exit

Poll

Page 2 of 61

1.2 We Learn about Populations using

Samples

Population – The total set of subjects in which we

are interested.

Ex. = the entire voting public

Sample – A subset of the population for whom we

have data.

Ex. = 200 randomly selected voters

Subject – entities that we measure in a study.

Ex. = each voter in the sample

Parameter – A numerical value summarizing the

population data.

Ex. = proportion of voters voting for candidate A in

the entire population

Statistic – A numerical value summarizing the

sample data.

Ex. = proportion of voters voting for candidate A in

our sample (the 200 randomly selected voters)

Example: A college dean is interested in learning

about the average age of faculty at the college. The

dean takes a random sample of 30 faculty

members and averages their 30 ages.

Match the following:

A. population

B. sample

C. subject

D. parameter

E. statistic

__________________________________________

____ the average age of all faculty members at the

college

____ 30 randomly selected faculty members at the

college

____ a single faculty member from the sample

____ all faculty members at the college

____ the average age of the 30 randomly selected

faculty members at the college

Symbols we use in Statistics

In the previous example, we were interested in the

average age of all faculty members at the University of

Georgia.

Whenever we are interested in an average for a full

population, there is a lower-case Greek symbol we use

to denote this value, μ. It is pronounced “mu”.

So in this previous example, we would say

μ = average age for all faculty members at UGA

Now, most of the time in real life, we will not be able to

actually calculate this value, so we try for the next best

thing. Like in the previous example, instead of trying to

find every single faculty member, we are okay with just

getting an average for 30 randomly selected faculty

members and use that as our estimate.

Whenever we have an average calculated from a sample,

like in this case, from 30 randomly selected faculty

members, there is a symbol we use for that average

from the sample, ⎯ x.

So in this example, ⎯ x = the average age for 30

randomly selected faculty members.

μ represents an average calculated from a full

population. ⎯ x represents an average calculated from a

sample.

Page 5 of 61

More Symbols

In the election example on page 1, we were interested in

studying proportions, not averages. So when we are

studying proportions, there are other symbols we use.

If we have the proportion for an entire population, like

the proportion of voters voting for candidate A in the

entire population, we use the letter “p” to denote this

population proportion.

However, if we have the proportion for just a sample,

like the proportion of voters voting for candidate A in

our sample (the 200 randomly selected voters), we use

the symbol to denote this sample proportion.

p represents a proportion calculated from a full

population. represents a proportion calculated from

a sample.

Page 6 of 61

Aspects of Statistics

1.) Design - How to obtain the data to answer

questions of interest.

Ex. use a survey, set up an experiment

2.) Description – summarizing the obtained data.

Describe the sample data.

EX – bar graph

3.) Inference – Making decisions and predictions

based on the sample data. Predict using the sample

data.

Ex – In our population, the majority of people want

the Saints to win the Super Bowl based on our

sample.

Sampling Methods (from Chapter 4)

Sampling – obtaining subjects that are representative of the

population to participate in a certain study so that accurate

information about the population can be obtained.

Simple Random Sampling – every subject has an equally

likely chance of being selected for the sample

When performing simple random sampling, usually

samples are chosen using a random number table.

Example of Simple Random Sampling:

The following table lists the 44 presidents of the United

States.

Obtain a simple random sample of size five using the

table on page 157 which is a random number table. We

will use row 1.

Page 13 of 61

Two Kinds of Quantitative Variables:

1.) Discrete – a countable number of values.

EX – The number of people in this class, the

number of words on this page.

2.) Continuous – an uncountable number of

values. Continuous variables are usually variables

that can take on all values on an interval.

EX – Height, Weight, Temperature

categorical

/

/

variable

\ discrete \ /

quantitative

**

continuous

Page 14 of 61

Example: Identify each of the following as

categorical or quantitative variables. If

quantitative, identify further as discrete or

continuous.

1. The length of time until a pain reliever begins

to work.

2. The colors used in a statistics textbook.

3. The number of files on a hard drive.

4. The number of staples in a stapler.

Frequency Tables

Frequency - number of occurrences.

Frequency table – Lists the number of observations for

each category of data.

Ex – Sample taken of 30 consumers’ favorite type of cookie Oreo Sugar Peanut Butter Chocolate Chip Chocolate Chip Chocolate Chip Oreo Chocolate Chip Oatmeal Raisin Chocolate Chip Oatmeal Raisin Chocolate Chip Chocolate Chip Sugar Brownie Sugar Oatmeal Raisin Oreo Brownie Peanut Butter Peanut Butter Oatmeal Raisin Chocolate Chip Oreo Oatmeal Raisin Brownie Peanut Butter Brownie Chocolate Chip Oreo

Favorite Cookie Frequency Oreo Chocolate Chip Oatmeal Raisin Sugar Peanut Butter Brownie

Instead of frequency, sometimes we are interested in the

proportion or percentage of observations within a certain

category.

Ex. Calculate the proportion of people that picked Chocolate Chip cookies.

Ex. Calculate the percentage of people that picked Peanut Butter cookies.

2.2 How can we describe data using graphs?

Bar Graphs – graphs constructed by putting the categories

on the horizontal axis, the frequency or proportion on the

vertical axis, and the height of the rectangles for each

category are equal to the category’s frequency or

proportion.

Favorite Cookie

5

9

5 3

4 4

0

1

2

3

4

5

6

7

8

9

10

Oreo Chocolate Chip

Oatmeal Raisin

Sugar Peanut Butter

Brownie

Cookie Type

Frequency

Favorite Cookie

0.13 0.

Oreo Chocolate Chip

Oatmeal Raisin

Sugar Peanut Butter

Brownie

Cookie Type

Page 17 of 61

Pareto chart – a bar graph whose bars are drawn in

decreasing order of frequency or proportion.

Favorite Cookie

0.17 0. 0.13 0.

Chocolate Chip

Oreo Oatmeal Raisin

Peanut Butter

Brownie Sugar

Cookie Type

y

Pie Charts – A pie chart is a circle divided into sectors.

Each sector represents a category of data.

Favorite Cookie

Chocolate Chip, 30.00%

Oreo , Oatmeal 16.67% Raisin, 16.67%

Peanut Butter, 13.33%

Brownie, 13.33%

Sugar, 10.00%

Page 18 of 61

Graphs for Quantitative Variables

Histogram – a bar graph for quantitative data.

Ex. The table below shows the number of points scored by the UGA football team in the 2002-2003 season.

Opponent # of Points Clemson 31 South Carolina 13 Northwestern St 45 New Mexico St. 41 Alabama 27 Tennessee 18 Vanderbilt 48 Kentucky 52 Florida 13 Ole Miss 31 Auburn 24 Georgia Tech 51 Arkansas 30 Florida St. 26

Construct a bar graph by tens. Have the groups be 10-19, 20- 29, 30-39, 40-49 and 50-59.

Stem and Leaf Plot – A stem and leaf plot is just a bar

graph on its side. The stem consists of all digits except for

the final one, which is the leaf.

Ex. The table below shows the number of points scored by the UGA football team in the 2002-2003 season.

Opponent # of Points Clemson 31 South Carolina 13 Northwestern St 45 New Mexico St. 41 Alabama 27 Tennessee 18 Vanderbilt 48 Kentucky 52 Florida 13 Ole Miss 31 Auburn 24 Georgia Tech 51 Arkansas 30 Florida St. 26

First, place the numbers in ascending order:

Then put the numbers into Stem-and Leaf Diagram

1| 2| 3| 4| 5|

Example

The following data represent the length of eruption in seconds for a random sample of eruptions of “Old Faithful”, a geyser at Yellowstone National Park. Draw a stem and leaf plot.

Page 25 of 61

Example: Using the previous UGA football example: Number of Points = 31, 13, 45, 41, 27, 18, 48, 52, 13, 31, 24, 51, 30, 26

What is the sum of all points scored by the Bulldogs that year?

What is the mean number of points scored by the Bulldogs that year?

What is the mode of this data? (This is an example of a bimodal dataset: has two modes)

What is the median of the data?

NOW, let’s see how StatCrunch can do these calculations for us.

Put in the data and go to Stat Æ Summary Stats Æ Columns

Page 26 of 61

The following frequency table shows the number of children in a daycare separated out by their ages: Age of Children Frequency 2 3 3 7 4 6 5 1

Write out all the ages for the children at the daycare.

How many total children attend the daycare?

What is the mean age for children at this daycare?

What is the median age for children at this daycare?

It is important to note that the mean is sensitive to extreme values in the dataset, either very large or very small numbers. The median, however, is not. The median is resistant to extreme values.

Example: Data set:

Find the mean

n =

Σx = mean =

Find the median

Put values in order:

Median =

Find the mode

Mode =

If I asked for the number which best describes the “middle” of the data, what is the best answer? Why?

Mean = Median: The graph is approximately normal/symmetrical.

Mean < Median: The graph is skewed left.

This is true because a skewed left graph has more low data values on the left. These low data values make the mean lower & less than the median.

Mean > Median: The graph is skewed right.

This is true because a skewed right graph has more high data values on the right. These high data values make the mean higher & greater than the median. Example: Match the histograms to these summary statistics. Mean Median Graph 1 42 42 2 31 36 3 31 26

Page 29 of 61

2.4 How can we describe the spread of

quantitative data?

Range – The difference between the largest and the smallest pieces of data.

range = Largest value - Smallest value

Deviation from the Mean – A deviation from the mean, x – ⎯x, is the difference between the value of x and the mean.

x − x

Ex. Data Set: 2, 6, 7, 9, 11

7 5

35

5

2 6 7 9 11 = =

x =

x x - ⎯ x Deviation

Page 30 of 61

Sample Variance – the mean of the squared deviations, calculated using n – 1 as the divisor. What you are doing when you are calculating sample variance is, in a way, you are averaging all the squared deviations, except you are dividing by n – 1 instead of dividing by n.

1

( )

2

−

−

∑

n

x x Variance

From the example on the previous page,

Variance =

Standard Deviation – the positive square-root of the variance

s = Variance From the example above,

s =

In lab, you will learn how to use StatCrunch to calculate this sample standard deviation value without having to go through all these steps.

x x - ⎯ x Deviation^ (x - ⎯ x) 2

SUM:

Variance and standard deviation measure how spread apart your data values are. The higher the variance and standard deviation, the more spread apart the data values will be.

Example: If we administered Test A and Test B to five students, and their scores were the following:

Test A: 20 58 79 92 98 Test B: 75 78 80 82 83 Which test scores would have a larger standard deviation? Why?

Just like we can either be looking at a population mean or a sample mean depending upon if we are looking at the entire population or just a sample from the population, we also have symbols to represent population standard deviation and sample standard deviation:

Population Standard Deviation – σ (known as sigma)

Sample Standard Deviation – s

Whenever we calculate standard deviation using StatCrunch, we are calculating sample standard deviation, s.

Example: Consider the following three data sets:

A: 50, 50, 50 B: 40, 50, 60 C: 30, 50, 70

Use these data sets to practice finding the sample standard deviation.

A Deviation Deviation 2 50 50 50

B Deviation Deviation 2 40 50 60

C Deviation Deviation 2 30 50 70

Which distribution has the smallest standard deviation?

Which distribution has the largest standard deviation?

Page 37 of 61

Quartiles – specific percentiles that are useful. Each set of data has three quartiles.

First Quartile (Q1) – the value such that 25% of the data values are smaller than Q1, and 75% are larger. This is also known as the 25th^ percentile.

Second Quartile (Q2) – the value such that 50% of the data values are smaller than Q2, and 50% are larger. This is also known as the median and the 50 th^ percentile.

Third Quartile (Q3) – the value such that 75% of the data values are smaller than Q3, and 25% are larger. This is also known as the 75th^ percentile.

Minimum Q1 Q2 Q3 Maximum

NOTE: Q1 and 25 th^ percentile are the same; Q3 and 75 th percentile are the same; Q2 and the 50 th^ percentile are the same.

Finding Quartiles

  1. Arrange the data in order.
  2. Find the median. This is the second quartile, Q2.
  3. Consider the lower half of the observations. The median of these observations is the first quartile, Q1.
  4. Consider the upper half of the observations. The median of these observations is the third quartile, Q3.

Page 38 of 61

The following data represent the hemoglobin (in g/dL) for 20 randomly selected cats. 5.7 7.7 7.8 8.7 8. 9.4 9.5 9.6 9.6 9. 10.0 10.3 10.6 10.7 11. 11.2 11.7 12.9 13.0 13.

Determine the quartiles.

Outliers – extreme observations that occur because of error in the measurement of the variable, during data entry, or from errors in sampling.

Steps for Checking for Outliers: 1.) Determine the first and third quartiles of the dataset. 2.) Compute the interquartile range. The interquartile range or IQR is the difference between the third and first quartile. IQR = Q3 – Q 3.) If a data value is less than Q1 – 1.5(IQR) or greater than Q3 + 1.5(IQR), it is considered an outlier.

Example (continued): Hemoglobin in Cats The following data represent the hemoglobin (in g/dL) for 20 randomly selected cats. 5.7 7.7 7.8 8.7 8. 9.4 9.5 9.6 9.6 9. 10.0 10.3 10.6 10.7 11. 11.2 11.7 12.9 13.0 13.

Compute the IQR.

Are there any outliers?

The 5-Number Summary and Boxplots

Minimum Q1 Q2 Q3 Maximum

This is the 5-number summary, it includes the minimum, Q1, Q or the median, Q3, and the maximum number.

Boxplot – a graph of the five number summary.

Steps in Drawing a Boxplot: 1.) Determine Q1, Q2, and Q3. 2.) Draw vertical lines at Q1, the median (Q2), and Q3. Enclose these vertical lines in a box. 3.) Draw a line from Q1 to the smallest data value that is not an outlier. Draw a line from Q3 to the largest data value that is not an outlier. 4.) Any data values that are outliers are marked with an asterisk (*).

Page 41 of 61

Example: Draw a boxplot for the cat data: 5.7 7.7 7.8 8.7 8. 9.4 9.5 9.6 9.6 9. 10.0 10.3 10.6 10.7 11. 11.2 11.7 12.9 13.0 13.

Step 1: Determine Q1, Q2, and Q

Step 2: Draw vertical lines at Q1, the median (Q2), and Q3. Enclose these vertical lines in a box. Step 3: Draw a line from Q1 to the smallest data value that is not an outlier. Draw a line from Q3 to the largest data value that is not an outlier. Step 4: Any data values that are outliers are marked with an asterisk (*).

Page 42 of 61

Distribution Shape Based upon Boxplot: 1.) If the median is near the center of the box and each horizontal line is approximately equal length, the distribution is approximately symmetric. 2.) If the median is to the left of the center of the box or the right line is much longer than the left line, the distribution is skewed right. 3.) If the median is to the right of the center of the box or the left line is much longer than the right line, the distribution is skewed left.

2. Z-score

Z-score – The position a value has relative to the mean measured in standard deviations.

value - mean

standard deviation

z − score =

The Z-score is the number of standard deviations a data value is from the mean.

NOTICE: If the value is equal to the mean then the z-score = 0.

Example:

From samples taken, the average 20-29 year-old man is

70.0 inches tall, with a standard deviation of 2.8 inches,

while the average 20-29 year-old woman is 64.6 inches

tall, with a standard deviation of 2.6 inches.

Find the z-score for a 75-inch tall man.

Find the z-score for a 70-inch tall woman.

Who is relatively taller, a 75-inch man or a 70-inch

woman?

If the heights for males are normally distributed, draw a curve representing these heights. Label where the 75-inch tall man is under this curve, and see that it corresponds to his Z-score.

What height is exactly two standard deviations below the mean. Calculate the Z-score for this height to make sure it does equal -2.

Using Z-Scores to check for Outliers

Outliers for a bell-shaped curve: A data value in a bell-shaped distribution is regarded as a potential outlier if it falls more than three standard deviations from the mean. Or, in other words, if a value has a Z-Score less than -3 or a Z-Score greater than +3, then it is a potential outlier.

Assume that male heights are normally distributed. In the previous example, would a male with a height of 58 inches be considered a potential outlier?

What about a male with a height of 62 inches?

Page 49 of 61

We asked 1795 their political affiliation and whether they think marijuana should be legalized. Here is the data we received: Legalize Marijuana? Political Affiliation

Yes No Total

Democrat 240 326 566 Independent 292 446 738 Republican 121 370 491 Total 653 1142 1795

Fill in the blank. A democrat is _______ times more likely to favor legalization of marijuana than a republican.

We can see that when we get larger differences in the conditional proportions like here, we get a much higher relative risk value than

Page 50 of 61

3.2 How can we explore the association between

two quantitative variables?

When we have two quantitative variables, the first thing we do is make a scatterplot of the data.

Scatterplot – a graphical display for two quantitative variables. (Explanatory variable is on the horizontal axis, response variable is on the vertical axis, and the points are not connected.) Example:

We want to see if the two variables (# spaces from GO and Cost) are associated, and later we will see if we can use the # spaces from GO (explanatory variable) to predict the cost of a property (response variable).

Here is a scatterplot of this data:

0

50

100

150

200

250

300

350

0 5 10 15 20 25 30 35

Spaces from GO

Cost

positive association – as x increases, y increases.

negative association – as x increases, y decreases.

no association – as x increases, there is no definite shift in the values of y.

Are the variables related? (Does it look like there is an association between these two variables?)

What type of association do we see in the scatterplot above?

Example: Determine the type of association for the following pairs of variables.

a) weight of a car and miles per gallon it gets

b) speed of a car and distance required to come to a complete stop

c) weight on a bar and number of repetitions a weightlifter can achieve

d) the temperature outside and my grade on a test

Page 53 of 61

So we can state the association between two variables, but what if we want to take it one step further and determine if there is a linear relationship between the variables? Then we calculate what we call correlation.

linear correlation – when the data tend to follow a straight line path (if x increases and y increases it is positive correlation; or if x increases and y decreases it is negative correlation)

no correlation – as x increases there is no definite shift in the values of y (no linear relationship between x & y)

Correlation can be:

  1. Positive, negative or no correlation
  2. Strong or weak correlation

Scatter Diagrams and Correlation:

Page 54 of 61

Coefficient of linear correlation (r) – the numerical measure of the strength of the linear relation between x and y.

Properties of Linear Correlation Coefficient: 1.) r must always be between -1 and 1. -1 ≤ r ≤ 1 2.) r > 0 indicates a positive linear relationship. If r = +1, there is perfect positive correlation. 3.) r < 0 indicates a negative linear relationship. If r = -1, there is perfect negative correlation. 4.) If r = 0, there is no linear relation between the 2 variables. 5.) A value of r close to 1 or -1 indicates a strong linear relationship; while, a value of r close to zero represents a weak linear relationship.

Which of the following is the strongest correlation?

.8, .67, -.34, 0, -.

Calculate r for the Monopoly data:

x: mean = 18.75, standard deviation = 11.

y: mean = 225, standard deviation = 59.

To recap, the correlation coefficient r tells us if there is a positive, negative or no linear relationship. r also tells us if it is a strong or weak linear relationship. StatCrunch can also calculate this r value by putting in the data and going to Stat Æ Summary Stats Æ Correlation

Example Weight(x) 40 80 100 120 150 Number of Reps(y) 25 20 18 15 10

1) Draw a scatterplot and comment on the type of relation that appears to exist between x and y. Is it a negative or positive relation? Does it seem strong or weak?

2) Calculate r for this data using StatCrunch.

Page 61 of 61

Example

Weight(x) 40 80 100 120 150 Number of Reps(y) 25 20 18 15 10

Given the following least-squares regression line for this data:

y ˆ = 30.7616 −0.1343 x

2.) What is the slope? Interpret that value.

3.) What is the y-intercept? Interpret that value.

4.) Predict the y value when x is 80.

5.) Compute the residual for x = 80.