MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency...

35
MATH 214 (NOTES) Math 214 Al Nosedal Department of Mathematics Indiana University of Pennsylvania MATH 214 (NOTES) – p. 1/3

Transcript of MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency...

Page 1: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

MATH 214 (NOTES)Math 214

Al Nosedal

Department of Mathematics

Indiana University of Pennsylvania

MATH 214 (NOTES) – p. 1/34

Page 2: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

CHAPTER 1DATA AND STATISTICS

MATH 214 (NOTES) – p. 2/34

Page 3: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Definitions.

Statistics is defined as the science of collecting, analyzing,presenting, and interpreting data.Data are the facts and figures collected, analyzed, andsummarized for presentation and interpretation.Elements are the entities on which data are collected.A variable is a characteristic of interest for the elements.Data can also be classified as either qualitative orquantitative. Qualitative data include labels or names used toidentify an attribute of each element.Quantitative data require numeric values that indicate howmuch or how many.

MATH 214 (NOTES) – p. 3/34

Page 4: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Descriptive Statistics

Most of the statistical information in newspapers,magazines, company reports, and other publicationsconsists of data that are summarized and presented in aform that is easy for the reader to understand. Suchsummaries of data, which may be tabular, graphical, ornumerical, are referred to as descriptive statistics.

MATH 214 (NOTES) – p. 4/34

Page 5: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Statistical Inference

Many situations require information about a large group ofelements. But, because of time, cost, and otherconsiderations, data can be collected from only a smallportion of the group. The larger group of elements in aparticular study is called the population, and the smallergroup is called the sample. As one of its major contributions,statistics uses data from a sample to make estimates andtest hypotheses about the characteristics of a populationthrough a process referred to as statistical inference.

MATH 214 (NOTES) – p. 5/34

Page 6: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

CHAPTER 2DESCRIPTIVE STATISTICS: TABULAR AND GRAPHICAL

PRESENTATIONS

MATH 214 (NOTES) – p. 6/34

Page 7: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Summarizing Qualitative Data

Frequency distribution. A frequency distribution is a tabularsummary of data showing the number (frequency) of itemsin each of several nonoverlapping classes.

Relative frequency of a class = Frequency of the classn

where n represents the total number of observations.

MATH 214 (NOTES) – p. 7/34

Page 8: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Bar graphs and pie charts

A bar graph, is a graphical device for depicting qualitativedata summarized in a frequency, relative frequency, orpercent frequency distribution. On one axis of the graph, wespecify the labels that are used for the classes (categories).A frequency, relative frequency, or percent frequency scalecan be used for the other axis of the graph.The pie chart provides another graphical device forpresenting relative frequency and percent frequencydistributions for qualitative data.

MATH 214 (NOTES) – p. 8/34

Page 9: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Summarizing Quantitative Data

A common graphical presentation of quantitative data is ahistogram. This graphical summary can be prepared for datapreviously summarized in either a frequency, relativefrequency, or percent frequency distribution. A histogram isconstructed by placing the variables of interest on thehorizontal axis and the frequency, relative frequency, orpercent frequency on the vertical axis.

MATH 214 (NOTES) – p. 9/34

Page 10: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Exercise (page 40)

11. Consider the following data14 21 23 21 16 19 22 25 16 1624 24 25 19 16 19 18 19 21 1216 17 18 23 25 20 23 16 20 1924 26 15 22 24 20 22 24 22 20a. Develop a frequency distribution using classes of 12-14,15-17, 18-20, 21-23, and 24-26.b. Develop a relative frequency distribution and a percentfrequency distribution using the classes in part (a).c. Make a histogram.

MATH 214 (NOTES) – p. 10/34

Page 11: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Solution

class freq. relative freq. percent freq.

12-14 2 2/40 0.0515-17 8 8/40 0.2018-20 11 11/40 0.27521-23 10 10/40 0.2524-26 9 9/40 0.225

MATH 214 (NOTES) – p. 11/34

Page 12: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Describing distributions with numbers

How much do people with a bachelor’s degree(but no higher degree) earn? Here are the incomesof 15 such people, chosen at random by the CensusBureau in March 2002 and asked how much they earnedin 2001. Most people reported their incomes to thenearest thousand dollars, so we have rounded theirresponses to thousands of dollars.110 25 50 50 55 30 35 30 4 32 50 30 32 74 60How could we find the "typical" income for people with abachelor’s degree (but no higher degree)?

MATH 214 (NOTES) – p. 12/34

Page 13: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Describing distributions with numbers

How much do people with a bachelor’s degree(but no higher degree) earn? Here are the incomesof 15 such people, chosen at random by the CensusBureau in March 2002 and asked how much they earnedin 2001. Most people reported their incomes to thenearest thousand dollars, so we have rounded theirresponses to thousands of dollars.110 25 50 50 55 30 35 30 4 32 50 30 32 74 60How could we find the "typical" income for people with abachelor’s degree (but no higher degree)?

MATH 214 (NOTES) – p. 12/34

Page 14: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

CHAPTER 3DESCRIPTIVE STATISTICS: NUMERICAL MEASURES

MATH 214 (NOTES) – p. 13/34

Page 15: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Measuring center: the mean

The most common measure of center is the ordinaryarithmetic average, or mean. To find the mean of a set ofobservations, add their values and divide by the number ofobservations. If the n observations are x1, x2, ..., xn, theirmean is

x =x1 + x2 + ... + xn

n(1)

or in more compact notation,

x =1

n

n∑

i=1

xi(2)

MATH 214 (NOTES) – p. 14/34

Page 16: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Measuring center: the median

The median M is the midpoint of a distribution, the numbersuch that half the observations are smaller and the otherhalf are larger. To find the median of the distribution:

Arrange all observations in order of size, from smallestto largest.

If the number of observations n is odd, the median M isthe center observation in the ordered list. Find thelocation of the median by counting n+1

2observations up

from the bottom of the list.

MATH 214 (NOTES) – p. 15/34

Page 17: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Measuring center: the median (cont.)

If the number of observations n is even, the median M isthe mean of the two center observations in the orderedlist. Find the location of the median by counting n+1

2

observations up from the bottom of the list.

MATH 214 (NOTES) – p. 16/34

Page 18: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

The quartiles Q1 and Q3

To calculate the quartiles:

Arrange the observations in increasing order and locatethe median M in the ordered list of observations.

The first quartile Q1 is the median of the observationswhose position in the ordered list is to the left of thelocation of the overall median

The third quartile Q3 is the median of the observationswhose position in the ordered list is to the right of thelocation of the overall median

MATH 214 (NOTES) – p. 17/34

Page 19: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Side-by-side Boxplots

Example. Here are the numbers of home runs that BabeRuth hit in his 15 years with the New York Yankees, 1920 to1934:54 59 35 41 46 25 47 60 54 46 49 46 41 34 22Another home run hitter is Mark McGwire, who retired afterthe 2001 season. Here are McGwire’s home run counts for1987 to 2001:49 32 33 39 22 42 9 9 39 52 58 70 65 32 29Find the five-number summaries and make side-by-sideboxplots to compare these two home run hitters. What doyour plots show?

MATH 214 (NOTES) – p. 18/34

Page 20: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Measures of association between 2 variables

Covariance (sample covariance)You can compute the covariance, SXY using the followingformula:

SXY =

∑n

i=1xiyi

n − 1−

nxy

n − 1(3)

MATH 214 (NOTES) – p. 19/34

Page 21: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Probability: Colors of M & M’s

If you draw an M & M candy at random from a bag of thecandies, the candy you draw will have one of the sevencolors. The probability of drawing each color depends on theproportion of each color among all candies made. Here isthe distribution for milk chocolate M & M’s:

Color Purple Yellow Red

Probability 0.2 0.2 0.2

Color Orange Brown Green Blue

Probability 0.1 0.1 0.1 ?

MATH 214 (NOTES) – p. 20/34

Page 22: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Colors of M & M’s (cont.)

a) What must be the probability of drawing a blue candy?b) What is the probability that you do not draw a browncandy?c) What is the probability that the candy you draw is eitheryellow, orange, or red?

MATH 214 (NOTES) – p. 21/34

Page 23: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Conditional probability

Problem. Josh and Al are avid tennis players and they enjoyplaying matches against each other. They do, however, haveone difference of opinion on the court. Al likes to have a nicelong warm-up session at the start where they hit the ballback and forth and back and forth. Josh’s ideal warm-up isto bend at the waist to tie his sneakers and to adjust hisshorts. Al thinks that when they rush through the warm-up,he doesn’t play as well.

MATH 214 (NOTES) – p. 22/34

Page 24: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Conditional probability (cont.)

The following table shows the outcomes of their last 20matches, along with the type of warm-up before they startedkeeping score.Does the type of warm-up have an influence on the outcomeof a match?

Warm-up time Al wins Josh wins Total

Less than 10 min. 4 9 1310 min. or more 5 2 7

Total 9 11 20

MATH 214 (NOTES) – p. 23/34

Page 25: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

CHAPTER 7SAMPLING DISTRIBUTIONS

MATH 214 (NOTES) – p. 24/34

Page 26: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Example

A couple plans to have three children. There are 8 possiblearrangements of girls and boys. For example, GGB meansthe first two children are girls and the third child is a boy. All8 arrangements are (approximately) equally likely.

a) Write down all 8 arrangements of the sexes of threechildren. What is the probability of any one of thesearrangements?

MATH 214 (NOTES) – p. 25/34

Page 27: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Example (cont.)

b) Let X be the number of girls the couple has. What isthe probability that X = 2 ?

c) Starting from your work in a), find the distribution of X.That is, what values can X take, and what are theprobabilities for each value?

MATH 214 (NOTES) – p. 26/34

Page 28: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Problem

We are interested in estimating the average number of carsper household in a little town call Statstown. Let X representthe number of cars in a house picked at random. God knowsthat X has a Binomial distribution with n = 4 and p = 0.5.Suppose that we can only afford a sample of size 4 and thatwe are going to use this sample to estimate that populationaverage.

MATH 214 (NOTES) – p. 27/34

Page 29: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Problem (cont.)

What we are going to do next is called a simulation. First,we will draw a lot of random samples coming from aBinomial Distribution with n = 4 and p = 0.5. Then we willmake a histogram for all the x’s corresponding to oursamples. We are going to do this do see what the histogramof x looks like. This will give us an idea of what to expect in asimilar situation.

MATH 214 (NOTES) – p. 28/34

Page 30: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Central Limit Theorem

Draw a random sample of size n from any population withmean µ and finite standard deviation σ. When n is large, thesampling distribution of the sample mean x is approximatelyNormal:

x is approximately N(µ,σ√

n)(4)

MATH 214 (NOTES) – p. 29/34

Page 31: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Example

The number of accidents per week at a hazardousintersection varies with mean 2.2 and standard deviation1.4. This distribution takes only whole-number values, so itis certainly not Normal.

a) Let x be the mean number of accidents per week atthe intersection during a year (52 weeks). What is theapproximate distribution of x according to the centrallimit theorem?

MATH 214 (NOTES) – p. 30/34

Page 32: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Example (cont.)

b) What is the approximate probability that x is less than2?

c) What is the approximate probability that there arefewer than 100 accidents at the intersection in a year?(Hint: Restate this event in terms of x)

MATH 214 (NOTES) – p. 31/34

Page 33: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

CHAPTER 9HYPOTHESIS TESTS

MATH 214 (NOTES) – p. 32/34

Page 34: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

Do you want to become a millionaire?

Let’s say that one of you is invited to this popular show. Asyou probably know, you have to answer a series of multiplechoice questions and there are four possible answers toeach question. Perhaps you also have seen that if you don’tknow the answer to a question you could either "jump thequestion" or you could "ask the audience".Suppose that you run into a question for which you don’tknow the answer with certainty and you decide to "ask theaudience". Let’s say that you initially believe that the rightanswer is A. Then you ask the audience and only 2% of theaudience shares your opinion. What would you do? Changeyour initial belief or reject it?

MATH 214 (NOTES) – p. 33/34

Page 35: MATH 214 (NOTES) - Department of Mathematics and ...math.unm.edu/~alvaro/math214.pdf · Frequency distribution. A frequency distribution is a tabular ... percent frequency on the

TO BE CONTINUED...

MATH 214 (NOTES) – p. 34/34