# The Chi-Square Distribution

## Test of Independence

Tests of independence involve using a contingency table of observed (data) values.
The test statistic for a test of independence is similar to that of a goodness-of-fit test
where
1. O = observed values,
2. E = expected values,
3. i = the number of rows in the table, and
4. j = the number of columns in the table.
There are  terms of the form
 .
A test of independence determines whether two factors are independent. You first encountered the term independence in Probability Topics. As a review, consider the following example.

### References

Harris  Interactive. (n.d.). Retrieved from http://www.statisticbrain.com/favorite-flavor-of-ice-cream/
Statistics Brain. (2016, June 29). Youngest online entrepreneurs list. Retrieved from http://www.statisticbrain.com/youngest-online-entrepreneur-list

### Chapter Review

To assess whether two factors are independent, you can apply the test of independence that uses the chi-square distribution. The null hypothesis for this test states that the two factors are independent. The test compares observed values to expected values. The test is right-tailed. Each observation or cell category must have an expected value of at least five.

### Formula Review

2. The number of degrees of freedom is equal to (number of columns–1)(number of rows–1).
3. The test statistic is

  where
O = observed values,
E = expected values,
i = the number of rows in the
table, and
j = the number of columns in
the table.

4. If the null hypothesis is true, the expected number

.

Determine the appropriate test to be used  in the next three exercises.
Use the following information to answer the next seven exercises: Transit Railroads is interested in the relationship between travel distance and the ticket class purchased. A random sample of 200 passengers is taken.  shows the results. The railroad wants to know if a passenger’s choice in ticket class is independent of the distance the passenger must travel.
Use the following information to answer the next ten exercises. An article in the New England Journal of Medicine discussed a study on people who used a certain product in California and Hawaii. In one part of the report, the self-reported ethnicity and product-use levels per day were given. Of the people using the product at most 10 times per day, there were 9,886 African Americans, 2,745 Native Hawaiians, 12,831 Latinos, 8,378 Japanese Americans, and 7,650 whites. Of the people using the product 11 to 20 times per day, there were 6,514 African Americans, 3,062 Native Hawaiians, 4,932 Latinos, 10,680 Japanese Americans, and 9,877 whites. Of the people using the product 21 to 30 times per day, there were 1,671 African Americans, 1,419 Native Hawaiians, 1,406 Latinos, 4,715 Japanese Americans, and 6,062 whites. Of the people using the product at least 31 times per day, there were 759 African Americans, 788 Native Hawaiians, 800 Latinos, 2,305 Japanese Americans, and 3,970 whites.
State the decision and conclusion (in a complete sentence) for the following levels of α.

### Homework

For each problem, use a solution sheet to solve the hypothesis test problem. Go to
Read the statement and decide whether it is true or false.


# The Chi-Square Distribution

## Test for Homogeneity

The goodness-of-fit test can be used to decide whether a population fits a given distribution, but it will not suffice to decide whether two populations follow the same unknown distribution. A different test, called the test for homogeneity, can be used to draw a conclusion about whether two populations have the same distribution. To calculate the test statistic for a test for homogeneity, follow the same procedure as with the test of independence.
HypothesesH: The distributions of the two populations are the same.
    H:  The distributions of the two populations are not the same.
 Test StatisticUse a    test statistic.  It is computed in the same way as the test for independence.
Degrees of freedom (df = number of columns – 1
 RequirementsAll values in the table must be greater than or equal to five.
 Common UsesComparing two populations. For example:  men vs. women, before vs. after, east vs. west. The variable is categorical with more than two possible response values.

### References

Bielick, S. (2008, December). 1.5 million homeschooled students in the United States in 2007 (NCES 2009030).
Washington, DC: National Center for Education Statistics. Retrieved from http://nces.ed.gov/pubsearch/pubsinfo.asp?pubid=2009030
Bielick, S. (2008, December). 1.5 million homeschooled students in the United States in 2007supplemental tables (NCES 2009030). Washington, DC: National Center for Education Statistics. Retrieved from http://nces.ed.gov/pubs2009/2009030_sup.pdf
Insurance Institute for Highway Safety. (n.d.). Ratings. Retrieved from www.iihs.org/iihs/ratings
World Bank Group. (2014). Energy use (kg of oil equivalent per capita). Retrieved from http://data.worldbank.org/indicator/EG.USE.PCAP.KG.OE/countries

### Chapter Review

To assess whether two data sets are derived from the same distribution, which need not be known, you can apply the test for homogeneity that uses the chi-square distribution. The null hypothesis for this test states that the populations of the two data sets come from the same distribution. The test compares the observed values against the expected values if the two populations followed the same distribution. The test is right-tailed. Each observation or cell category must have an expected value of at least five.

### Formula Review

     Homogeneity test statistic where	O = observed values   E = expected values i = number of rows in data contingency table j = number of columns in data contingency table
df = (i −1)(j −1)  degrees of freedom
Use the following information to answer the next five exercises. Do private practice doctors and hospital doctors have the same distribution of working hours? Suppose that a sample of 100 private practice doctors and 150 hospital doctors are selected at random and asked about the number of hours a week they work. The results are shown in .

### Homework

For each word problem, use a solution sheet to solve the hypothesis test problem. Go to


# The Chi-Square Distribution

## Comparison of the Chi-Square Tests

You have seen the χ2 test statistic used in three different circumstances. The following bulleted list is a summary that will help you decide which χ2 test is the appropriate one to use.
1. Goodness-of-Fit: Use the goodness-of-fit test to decide whether a population with an unknown distribution fits a known distribution. In this case there will be a single qualitative survey question or a single outcome of an experiment from a single population. Goodness-of-fit is typically used to see if the population is uniform (all outcomes occur with equal frequency), the population is normal, or the population is the same as another population with a known distribution. The null and alternative hypotheses are as follows:
H: The population fits the given distribution.
H: The population does not fit the given distribution.
2. Independence: Use the test for independence to decide whether two variables (factors) are independent or dependent. In this case there will be two qualitative survey questions or experiments and a contingency table will be constructed. The goal is to see if the two variables are unrelated/independent or related/dependent. The null and alternative hypotheses are as follows:
H: The two variables (factors) are independent.
H: The two variables (factors) are dependent.
3. Homogeneity: Use the test for homogeneity to decide if two populations with unknown distributions have the same distribution. In this case there will be a single qualitative survey question or experiment given to two different populations. The null and alternative hypotheses are as follows:
H: The two populations follow the same distribution.
H: The two populations have different distributions.

### Chapter Review

The goodness-of-fit test is typically used to determine if data fits a particular distribution. The test of independence makes use of a contingency table to determine the independence of two factors. The test for homogeneity determines whether two populations come from the same distribution, even if this distribution is unknown.

### Homework

For each word problem, use a solution sheet to solve the hypothesis test problem. Go to
Read the statement and decide whether it is true or false.

### Bringing It Together


# The Chi-Square Distribution

## Test of a Single Variance

A test of a single variance assumes that the underlying distribution is normal. The null and alternative hypotheses are stated in terms of the population variance or population standard deviation. The test statistic is
where
1.  n = the total number of data,
2. s2 = sample variance, and
3. σ2 = population variance.
You may think of s as the random variable in this test. The number of degrees of freedom is df = n – 1. A test of a single variance may be right-tailed, left-tailed, or two-tailed.  will show you how to set up the null and alternative hypotheses. The null and alternative hypotheses contain statements about the population variance.

### References

Apple Insider. (n.d.). Retrieved from http://appleinsider.com/mac_price_guide
World Bank. (n.d.). Retrieved from http://www.worldbank.org/

### Chapter Review

To test variability, use the chi-square test of a single variance. The test may be left-, right-, or two-tailed, and its hypotheses are always expressed in terms of the variance or standard deviation.

### Formula Review

  Test of a single variance statistic where
   n: sample size
   s: sample standard deviation
   σ: population standard deviation
df = n – 1 degrees of freedom
2. Use the test to determine variation.
3. The degrees of freedom is the number of samples – 1.
4. The test statistic is
 , where n = the total number of data, s2 = sample variance, and σ2 = population variance.

5. The test may be left-, right-, or two-tailed.
Use the following information to answer the next three exercises. An archer’s standard deviation for his hits is six, where the data are measured in distance from the center of the target. An observer claims the standard deviation is less than six.
Use the following information to answer the next three exercises. The standard deviation of heights for students in a school is 0.81. A random sample of 50 students is taken, and the standard deviation of heights of the sample is 0.96. A researcher in charge of the study believes the standard deviation of heights for the school is greater than 0.81.
Use the following information to answer the next four exercises: The average waiting time in a doctor’s office varies. The standard deviation of waiting times in a doctor’s office is 3.4 minutes. A random sample of 30 patients in the doctor’s office has a standard deviation of waiting times of 4.1 minutes. One doctor believes the variance of waiting times is greater than originally thought.

### Homework

Use the following information to answer the next 12 exercises. Suppose an airline claims that its flights are consistently on time with an average delay of at most 15 minutes. It claims that the average delay is so consistent that the variance is no more than 150 minutes. Doubting the consistency part of the claim, a disgruntled traveler calculates the delays for his next 25 flights. The average delay for those 25 flights is 22 minutes with a standard deviation of 15 minutes.

For each word problem, use a solution sheet to solve the hypothesis test problem. Go to


# Linear Regression and Correlation

## Introduction

Professionals often want to know how two or more numeric variables are related. For example, is there a relationship between the grade on the second math exam a student takes and the grade on the final exam? If there is a relationship, what is the relationship, and how strong is it?
In another example, your income may be determined by your education, your profession, your years of experience, and your ability. The amount you pay a repair person for labor is often determined by an initial amount plus an hourly fee.
The type of data described in the examples is bivariate data—bi—for two variables. In reality, statisticians use multivariate data, meaning many variables.
In this chapter, you will study the simplest form of regression—linear regression—with one independent variable (x). This involves data that fit a line in two dimensions. You will also study correlation, which measures the strength of a relationship.


# Linear Regression and Correlation

## Linear Equations

Linear regression for two variables is based on a linear equation with one independent variable. The equation has the form
where a and b are constant numbers.
The variable x is the independent variable; y is the dependent variable. Typically, you choose a value to substitute for the independent variable and then solve for the dependent variable.
The graph of a linear equation of the form y = a + bx is a straight line. Any line that is not vertical can be described by this equation.

### Slope and y-interceptof a Linear Equation

For the linear equation y = a + bx, b = slope and a = y-inttercept. From algebra, recall that the slope is a number that describes the steepness of a line; the y-intercept is the y-coordinate of the point (0, a), where the line crosses the y-axis.
Please note that in previous courses you learned

   was the slope-intercept form of the equation, where m represented the slope and b represented the y-intercept. In this text, the form

   is used, where a is the y-intercept and b is the slope. The key is remembering the coefficient of x is the slope, and the constant number is the y-intercept.

### References

Centers for Disease Control and Prevention. (n.d.). Retrieved from https://www.cdc.gov/
National Center for HIV/AIDS, Viral Hepatitis, STD, and TB Prevention. (n.d.). Centers for Disease Control and Prevention. Retrieved from https://www.cdc.gov/nchhstp/default.htm

### Chapter Review

The most basic type of association is a linear association. This type of relationship can be defined algebraically by the equations used (numerically with actual or predicted data values) or graphically from a plotted curve. Lines are classified as straight curves. Algebraically, a linear equation typically takes the form y = mx + b, where m and b are constants, x is the independent variable, and y is the dependent variable. In a statistical context, a linear equation is written in the form y = a + bx, where a and b are the constants. This form is used to help you distinguish the statistical context from the algebraic context. In the equation y = a + bx, the constant b that multiplies the x variable (b is called a coefficient) is called the slope. The slope describes the rate of change between the independent and dependent variables; in other words, the rate of change describes the change that occurs in the dependent variable as the independent variable is changed. In the equation y = a + bx, the constant a is called the y-intercept. Graphically, the y-intercept is the y-coordinate of the point where the graph of the line crosses the y-axis.  At this point, x = 0.
The slope of a line is a value that describes the rate of change between the independent and dependent variables. The slope tells us how the dependent variable (y) changes for every one-unit increase in the independent (x) variable, on average. The y-intercept is used to describe the dependent variable when the independent variable equals zero. Graphically, the slope is represented by three line types in elementary statistics.

### Formula Review

y = a + bx, where a is the y-intercept and b is the slope. The variable x is the independent variable and y is the dependent variable.
Use the following information to answer the next three exercises. A vacation resort rents scuba equipment to certified divers. The resort charges an up-front fee of $25 and another fee of $12.50 an hour.
Use the following information to answer the next two exercises. A credit card company charges $10 when a payment is late and $5 a day each day the payment remains unpaid.
Use the following information to answer the next exercise.  contains real data for the first two decades of flu reporting.
Use the following information to answer the next two exercises. A specialty cleaning company charges an equipment fee and an hourly labor fee. A linear equation that expresses the total amount of the fee the company charges for each session is y = 50 + 100x.
Use the following information to answer the next three questions. As a result of erosion, a river shoreline is losing several thousand pounds of soil each year. A linear equation that expresses the total amount of soil lost per year is y = 12,000x.
Use the following information to answer the next two exercises. The price of a single issue of stock can fluctuate throughout the day. A linear equation that represents the price of stock for Shipment Express is y = 15 – 1.5x, where x is the number of hours passed in an eight-hour day of trading.

### Homework


# Linear Regression and Correlation

## The Regression Equation

Data rarely fit a straight line exactly. Usually, you must be satisfied with rough
predictions. Typically, you have a set of data with a scatter plot that appear to fit a straight line. This is called a line of best fit or least-squares regression line.
The third exam score, x, is the independent variable, and the final exam score, y, is the dependent variable. We will plot a regression line that best fits the data. If each of you were to fit a line by eye, you would draw different lines. We can obtain a line of best fit using either the median-median line approach or by calculating the least-squares regression line.
Let's first find the line of best fit for the relationship between the third exam score and the final exam score using the median-median line approach. Remember that this is the data from  after the ordered pairs have been listed by ordering x values. If multiple data points have the same y values, then they are listed in order from least to greatest y (see data values where x = 71). We first divide our scores into three groups of approximately equal numbers of x values per group. The first and third groups have the same number of x values. We must remember first to put the x values in ascending order. The corresponding y values are then recorded. However, to find the median, we first must rearrange the y values in each group from the least value to the greatest value.  shows the correct ordering of the x values but does not show a reordering of the y values.
With this set of data, the first and last groups each have four x values and four corresponding y values. The second group has three x values and three corresponding y values. We need to organize the x and y values per group and find the median x and y values for each group. Let’s now write out our y values for each group in ascending order. For group 1, the y values in order are 126, 133, 153, and 175. For group 2, the y values are already in order. For group 3, the y values are also already in order. We can represent these data as shown in , but notice that we have broken the ordered pairs; (65, 126) is not a data point in our original set:
When this is completed, we can write the ordered pairs for the median values. This allows us to find the slope and y-intercept of the median-median line.
The ordered pairs are (66.5, 143), (69, 159), and (71, 174).
The slope can be calculated using the formula

   Substituting the median x and y values from the first and third groups gives

   which simplifies to

The y-intercept may be found using the formula

  , which means the quantity of the sum of the median y values minus the slope times the sum of the median x values divided by three.
The sum of the median x values is 206.5, and the sum of the median y values is 476. Substituting these sums and the slope into the formula gives

  , which simplifies to

The line of best fit is represented as

Thus, the equation can be written as y = 6.9x − 316.3.
The median–median line may also be found using your graphing calculator. You can enter the x and y values into two separate lists; choose Stat, Calc, Med-Med, and press Enter. The slope, a, and y-intercept, b, will be provided. The calculator shows a slight deviation from the previous manual calculation as a result of rounding. Rounding to the nearest tenth, the calculator gives the median-median line of
  Each point of data is of the the form (x, y), and each point of the line of best fit using least-squares linear regression has the form (x, ŷ).
The ŷ is read y hat and is the estimated value of y. It is the value of y obtained using the regression line. It is not generally equal to y from data, but it is still important because it can help make predictions for other values.

The term y0 – ŷ0 = ε0 is called the error or residual. It is not an error in the sense of a mistake. The absolute value of a residual measures the vertical distance between the actual value of y and the estimated value of y. In other words, it measures the vertical distance between the actual data point and the predicted point on the line, or it measures how far the estimate is from the actual data value.
If the observed data point lies above the line, the residual is positive and the line underestimates the actual data value for y.  If the observed data point lies below the line, the residual is negative and the line overestimates that actual data value for y.
In , y0 – ŷ0 = ε0 is the residual for the point shown. Here the point lies above the line and the residual is positive.
ε = the Greek letter epsilon
For each data point, you can calculate the residuals or errors, yi  ŷi = εi for i = 1, 2, 3, . . . , 11.
Each |ε| is a vertical distance.
For the example about the third exam scores and the final exam scores for the 11 statistics students, there are 11 data points. Therefore, there are 11 ε values. If you square each ε and add them, you get the sum of ε squared from i = 1 to i = 11, as shown below.

This is called the sum of squared errors (SSE).
Using calculus, you can determine the values of a and b that make the SSE a minimum. When you make the SSE a minimum, you have determined the points that are on the line of best fit. It turns out that the line of best fit has the equation

where

and

  .
The sample means of the x values and the y values are
  and
 , respectively. The best-fit line always passes through the point
 .
The slope (b) can be written as
  where s = the standard deviation of the y values and s = the standard deviation of the x values. r is the correlation coefficient, which shows the relationship between the x and y values. This will be discussed in more detail in the next section.

### Least-Squares Criteria for Best Fit

The process of fitting the best-fit line is called linear regression. We assume that the data are scattered about a straight line. To find that line, we minimize the sum of the squared errors (SSE), or make it as small as possible. Any other line you might choose would have a higher SSE than the best-fit line. This best-fit line is called the least-squares regression line.

### Third Exam vs. Final Exam Example

The graph of the line of best fit for the third exam/final exam example is as follows:
The least-squares regression line (best-fit line) for the third exam/final exam example has the equation

### Understanding and Interpreting the y-intercept

The y-intercept, a, of the line describes where the plot line crosses the y-axis. The y-intercept of the best-fit line tells us the best value of the relationship when x is zero. In some cases, it does not make sense to figure out what y is when x = 0. For example, in the third exam vs. final exam example, the y-intercept occurs when the third exam score, or x, is zero. Since all the scores are grouped around a passing grade, there is no need to figure out what the final exam score, or y, would be when the third exam was zero.
However, the y-intercept is very useful in many cases. For many examples in science, the y-intercept gives the baseline reading when the experimental conditions aren't applied to an experimental system. This baseline indicates how much the experimental condition affects the system. It could also be used to ensure that equipment and measurements are calibrated properly before starting the experiment.
In biology, the concentration of proteins in a sample can be measured using a chemical assay that changes color depending on how much protein is present. The more protein present, the darker the color. The amount of color can be measured by the absorbance reading.  shows the expected absorbance readings at different protein concentrations. This is called a standard curve for the assay.
The scatter plot  includes the line of best fit.
The y-intercept of this line occurs at 0.0226 mAU. This means the assay gives a reading of 0.0226 mAU when there is no protein present. That is, it is the baseline reading that can be attributed to something else, which, in this case, is some other non-protein chemicals that are absorbing light. We can tell that this line of best fit is reasonable because the y-intercept is small, close to zero. When there is no protein present in the sample, we expect the absorbance to be very small, or close to zero, as well.

### Understanding Slope

The slope of the line, b, describes how changes in the variables are related. It is important to interpret the slope of the line in the context of the situation represented by the data. You should be able to write a sentence interpreting the slope in plain English.

Interpretation of the Slope: The slope of the best-fit line tells us how the dependent variable (y) changes for every one unit increase in the independent (x) variable, on average.
Third Exam vs. Final Exam ExampleSlope: The slope of the line is b = 4.83.
Interpretation: For a 1-point increase in the score on the third exam, the final exam score increases by 4.83 points, on average.

### The Correlation Coefficient r

Besides looking at the scatter plot and seeing that a line seems reasonable, how can you determine whether the line is a good predictor? Use the correlation coefficient as another indicator (besides the scatter plot) of the strength of the relationship between x and y.
The correlation coefficient,  developed by Karl Pearson during the early 1900s, is numeric and provides a measure of the strength and direction of the linear association between the independent variable x and the dependent variable y.

If you suspect a linear relationship between x and y, then r can measure the strength of the linear relationship.
What the Value of

What the Sign of

The correlation coefficient is calculated as the quantity of data points times the sum of the quantity of the x-coordinates times the y-coordinates, minus the quantity of the sum of the x-coordinates times the sum of the y-coordinates, all divided by the square root of the quantity of data points times the sum of the x-coordinates squared minus the square of the sum of the x-coordinates, times the number of data points times the sum of the y-coordinates squared minus the square of the sum of the y-coordinates. It can be summarized by the following equation:

where n is the number of data points.
The formula for r looks formidable. However, computer spreadsheets, statistical software, and many calculators can calculate r quickly. The correlation coefficient, r, is the bottom item in the output screens for the LinRegTTest on the TI-83, TI-83+, or TI-84+ calculator (see previous section for instructions).

### The Coefficient of Determination

The variable r2 is called the coefficient of determination and it is the square of the correlation coefficient, but it is usually stated as a percentage, rather than in decimal form. It has an interpretation in the context of the data:
1.
 when expressed as a percent, represents the percentage of variation in the dependent (predicted) variable y that can be explained by variation in the independent (explanatory) variable x using the regression (best-fit) line.
2. 1 –  when expressed as a percentage, represents the percentage of variation in y that is not explained by variation in x using the regression line. This can be seen as the scattering of the observed data points about the regression line.
Consider the third exam/final exam example introduced in the previous section.

Interpret r2 in the context of this example.

### Chapter Review

A regression line, or a line of best fit, can be drawn on a scatter plot and used to predict outcomes for the x and y variables in a given data set or sample data. There are several ways to find a regression line, but usually the least-squares regression line is used because it creates a uniform line. Residuals, also called errors, measure the distance from the actual value of y and the estimated value of y. The sum of squared errors, or SSE, when set to its minimum, calculates the points on the line of best fit. Regression lines can be used to predict values within the given set of data but should not be used to make predictions for values outside the set of data.
The correlation coefficient, r, measures the strength of the linear association between x and y. The variable r has to be between –1 and +1. When r is positive, x and y tend to increase and decrease together. When r is negative, x increases and y decreases, or the opposite occurs: x decreases and y increases. The coefficient of determination, r2, is equal to the square of the correlation coefficient. When expressed as a percentage, r2 represents the percentage of variation in the dependent variable, y, that can be explained by variation in the independent variable, x, using the regression line.
Use the following information to answer the next five exercises. A random sample of 10 professional athletes produced the following data, where x is the number of endorsements the player has and y is the amount of money made, in millions of dollars.

### Homework


# Linear Regression and Correlation

## Testing the Significance of the Correlation Coefficient (Optional)

The correlation coefficient, r, tells us about the strength and direction of the linear relationship between x and y. However, the reliability of the linear model also depends on how many observed data points are in the sample. We need to look at both the correlation coefficient r and the sample size n, together.
We perform a hypothesis test of the significance of the correlation coefficient to decide whether the linear relationship in the sample data is strong enough to use to model the relationship in the population.
The sample data are used to compute r, the correlation coefficient for the sample. If we had data for the entire population, we could find the population correlation coefficient. But, because we have only sample data, we cannot calculate the population correlation coefficient. The sample correlation coefficient, r, is our estimate of the unknown population correlation coefficient.
1. The symbol for the population correlation coefficient is ρ, the Greek letter rho.
2. ρ = population correlation coefficient (unknown).
3. r = sample correlation coefficient (known; calculated from sample data).
The hypothesis test lets us decide whether the value of the population correlation coefficient ρ is close to zero or significantly different from zero. We decide this based on the sample correlation coefficient r and the sample size n.
If the test concludes the correlation coefficient is significantly different from zero, we say the correlation coefficient is significant.

If the test concludes the correlation coefficient is not significantly different from zero (it is close to zero), we say the correlation coefficient is not significant.

### Performing the Hypothesis Test

1. Null hypothesis: H0: ρ = 0.
2. Alternate hypothesis: H: ρ ≠ 0.
What the Hypothesis Means in Words:
1. Null hypothesis  The population correlation coefficient is not significantly different from zero. There is not a significant linear relationship (correlation) between x and y in the population.
2. Alternate hypothesis  The population correlation coefficient is significantly different from zero. There is a significant linear relationship (correlation) between x and y in the population.
Drawing a Conclusion:There are two methods to make a conclusion. The two methods are equivalent and give the same result.
1. Method 1: Use the
2. Method 2: Use a table of critical values.
In this chapter, we will always use a significance level of 5 percent, α = 0.05.

### METHOD 1:  Using a p-value to Make a Decision

2. Decision: Reject the null hypothesis.
3. Conclusion: There is sufficient evidence to conclude there is a significant linear relationship between x and y because the correlation coefficient is significantly different from zero.
2. Decision: Do not reject the null hypothesis.
3. Conclusion: There is insufficient evidence to conclude there is a significant linear relationship  between x and y because the correlation coefficient is not significantly different from zero.
You will use technology to calculate the p-value, but it is useful to know that the p-value is calculated using a t distribution with n – 2 degrees of freedom and that the p-value is the combined area in both tails.
An alternative way to calculate the p-value (p) given by LinRegTTest is the command 2*tcdf(abs(t),10^99, n–2) in 2nd DISTR.
2. Consider the third exam/final exam example.
3. The line of best fit is ŷ = 173.51 + 4.83x, with r = 0.6631, and there are n = 11 data points.
4. Can the regression line be used for prediction? Given a third exam score (x value), can we
use the line to predict the final exam score (predicted y value)?
H0: ρ = 0
H: ρ ≠ 0
α = 0.05
1. The p-value is 0.026 (from LinRegTTest on a calculator or from computer software).
2. The p-value, 0.026, is less than the significance level of α = 0.05.
3. Decision: Reject the null hypothesis H0.
4. Conclusion: There is sufficient evidence to conclude there is a significant linear relationship between the third exam score (x) and the final exam score (y) because the correlation coefficient is significantly different from zero.
Because r is significant and the scatter plot shows a linear trend, the regression line can be used to predict final exam scores.

### METHOD 2: Using a Table of Critical Values to Make a Decision

The 95 Percent Critical Values of the Sample Correlation Coefficient Table () can be used to give you a good idea of whether the computed value of r is significant. Use it to find the critical values using the degrees of freedom, df = n – 2. The table has already been calculated with α = 0.05. The table tells you the positive critical value, but you should also make that number negative to have two critical values. If r is not between the positive and negative critical values, then the correlation coefficient is significant. If r is significant, then you may use the line for prediction. If r is not significant (between the critical values), you should not use the line to make predictions.

### Third Exam vs. Final Exam Example: Critical Value Method

Consider the third exam/final exam example.
The line of best fit is: ŷ = –173.51 + 4.83x, with r = .6631, and there are n = 11 data points. Can the regression line be used for prediction? Given a third exam score (x value), can we use the line to predict the final exam score (predicted y value)?

1. H0: ρ = 0
2.  H: ρ ≠ 0
3. α = 0.05
1. Use the 95 Percent Critical Values table for r with df = n – 2 = 11 – 2 = 9.
2. Using the table with df = 9, we find that the critical value listed is 0.602. Therefore, the critical values are ±0.602.
3. Since 0.6631 > 0.602, r is significant.
4. Decision: Reject the null hypothesis.
5. Conclusion: There is sufficient evidence to conclude there is a significant  linear relationship between the third exam score (x) and the final exam score (y) because the correlation coefficient is significantly different from zero.
Because r is significant and the scatter plot shows a linear trend, the regression line can be used to predict final exam scores.

### Assumptions in Testing the Significance of the Correlation Coefficient

Testing the significance of the correlation coefficient requires that certain assumptions about the data be satisfied. The premise of this test is that the data are a sample of observed points taken from a larger population.  We have not examined the entire population because it is not possible or feasible to do so.  We are examining the sample to draw a conclusion about whether the linear relationship that we see between x and y in the sample data provides strong enough evidence that we can conclude there is a linear relationship between x and y in the population.
The regression line equation that we calculate from the sample data gives the best-fit line for our particular sample. We want to use this best-fit line for the sample as an estimate of the best-fit line for the population. Examining the scatter plot and testing the significance of the correlation coefficient helps us determine whether it is appropriate to do this.
2. There is a linear relationship in the population that models the sample data. Our regression line from the sample is our best estimate of this line in the population.
3.  The y values for any particular x value are normally distributed about the line. This implies there are more y values scattered closer to the line than are scattered farther away. Assumption 1 implies that these normal distributions are centered on the line; the means of these normal distributions of y values lie on the line.
4. Normal distributions of all the y values have the same shape and spread about the line.
5. The residual errors are mutually independent (no pattern).
6. The data are produced from a well-designed, random sample or randomized experiment.

### Chapter Review

Linear regression is a procedure for fitting a straight line of the form ŷ = a + bx to data. The conditions for regression are as follows:
1. Linear: In the population, there is a linear relationship that models the average value of y for different values of x.
2. Independent: The residuals are assumed to be independent.
3. Normal: The y values are distributed normally for any value of x.
4. Equal variance: The standard deviation of the y values is equal for each x value.
5. Random: The data are produced from a well-designed random sample or a randomized experiment.
The slope b and intercept a of the least-squares line estimate the slope β and intercept α of the population (true) regression line. To estimate the population standard deviation of y (σ) use the standard deviation of the residuals:
 . The variable ρ (rho) is the population correlation coefficient. To test the null hypothesis, H0: ρ = hypothesized value, use a linear regression t-test.  The most common null hypothesis is H0: ρ = 0, which indicates there is no linear relationship between x and y in the population. The TI-83, 83+, 84, 84+ calculator function LinRegTTest can perform this test (STATS, TESTS, LinRegTTest).

### Formula Review

Least-Squares Line or Line of Best Fit:

where a is the y-intercept and b is the slope.
Standard Deviation of the Residuals:

where SSE = sum of squared errors, and
n = the number of data points.


# Linear Regression and Correlation

## Prediction (Optional)

Recall the third exam/final exam example.
We found the equation of the best-fit line for the final exam grade as a function of the grade on the third exam. We can now use the least-squares regression line for prediction.
Suppose you want to estimate, or predict, the mean final exam score of statistics students who received a 73 on the third exam. The exam scores (x values) range from 65 to 75. Since 73 is between the x values 65 and 75, substitute x = 73 into the equation. Then,
We predict that statistics students who earn a grade of 73 on the third exam will earn a grade of 179.08 on the final exam, on average.

### References

Centers for Disease Control and Prevention. (n.d.). Retrieved from https://www.cdc.gov/
National Center for HIV/AIDS, Viral Hepatitis, STD, and TB Prevention. (n.d.). Centers for Disease Control and Prevention. Retrieved from https://www.cdc.gov/nchhstp/default.htm
National Center for Health Statistics. (n.d.). Centers for Disease Control and Prevention. Retrieved from https://www.cdc.gov/nchs/index.htm
U.S. Census Bureau. (n.d.). Retrieved from http://www.census.gov/compendia/statab/cats/transportation/motor_vehicle_accidents_and_fatalities.html

### Chapter Review

After determining the presence of a strong correlation coefficient and calculating the line of best fit, you can use the least-squares regression line to make predictions about your data.
Use the following information to answer the next two exercises. An electronics retailer used regression to find a simple model to predict sales growth in the first quarter of the new year (January through March). The model is good for 90 days, where x is the day. The model can be written as ŷ = 101.32 + 2.48x, where ŷ is in thousands of dollars.
Use the following information to answer the next three exercises. A landscaping company is hired to mow the grass for several large properties. The total area of the properties is 1,345 acres. The rate at which one person can mow is ŷ = 1350 – 1.2x, where x is the number of hours and ŷ represents the number of acres left to mow.
Use the following information to answer the next 14 exercises.  contains real data for the first two decades of flu reporting.

### Homework


# Linear Regression and Correlation

## Outliers

In some data sets, there are values (observed data points) called outliers. Outliers are observed data points that are far from the least-squares line. They have large errors, where the error or residual is not very close to the best-fit line.
Outliers need to be examined closely. Sometimes, they should not be included in the analysis of the data, like if it is possible that an outlier is a result of incorrect data. Other times, an outlier may hold valuable information about the population under study and should remain included in the data. The key is to examine carefully what causes a data point to be an outlier.
Besides outliers, a sample may contain one or a few points that are called influential points. Influential points are observed data points that are far from the other observed data points in the horizontal direction. These points may have a big effect on the slope of the regression line. To begin to identify an influential point, you can remove it from the data set and determine whether the slope of the regression line is changed significantly.
You also want to examine how the correlation coefficient, r, has changed. Sometimes, it is difficult to discern a significant change in slope, so you need to look at how the strength of the linear relationship has changed. Computers and many calculators can be used to identify outliers and influential points. Regression analysis can determine if an outlier is, indeed, an influential point. The new regression will show how omitting the outlier will affect the correlation among the variables, as well as the fit of the line. A graph showing both regression lines helps determine how removing an outlier affects the fit of the model.

### Identifying Outliers

We could guess at outliers by looking at a graph of the scatter plot and best-fit line. However, we would like some guideline regarding how far away a point needs to be to be considered an outlier. As a rough rule of thumb, we can flag as an outlier any point that is located farther than two standard deviations above or below the best-fit line. The standard deviation used is the standard deviation of the residuals or errors.
We can do this visually in the scatter plot by drawing an extra pair of lines that are two standard deviations above and below the best-fit line. Any data points outside this extra pair of lines are flagged as potential outliers. Or, we can do this numerically by calculating each residual and comparing it with twice the standard deviation. With regard to the TI-83, 83+, or 84+ calculators, the graphical approach is easier. The graphical procedure is shown first, followed by the numerical calculations. You would generally need to use only one of these methods.

### Numerical Identification of Outliers

In , the first two columns include the third exam and final exam data. The third column shows the predicted ŷ values calculated from the line of best fit: ŷ = –173.5 + 4.83x. The residuals, or errors, that were mentioned in Section 3 of this chapter have been calculated in the fourth column of the table: Observed y value  predicted y value = y  ŷ.
s is the standard deviation of all the y  ŷ = ε values, where n is the total number of data points. If each residual is calculated and squared, and the results are added, we get the SSE. The standard deviation of the residuals is calculated from the SSE as
Rather than calculate the value of s ourselves, we can find s using a computer or calculator. For this example, the calculator function LinRegTTest found s = 16.4 as the standard deviation of the residuals .
We are looking for all data points for which the residual is greater than 2s = 2(16.4) = 32.8 or less than –32.8. Compare these values with the residuals in column four of the table. The only such data point is the student who had a grade of 65 on the third exam and 175 on the final exam; the residual for this student is 35.

### How Does the Outlier Affect the Best-Fit Line?

Numerically and graphically, we have identified point (65, 175) as an outlier. Recall that recalculation of the least-squares regression line and summary statistics, following deletion of an outlier, may be used to determine whether an outlier is also an influential point. This process also allows you to compare the strength of the correlation of the variables and possible changes in the slope both before and after the omission of any outliers.
Compute a new best-fit line and correlation coefficient using the 10 remaining points.
On the TI-83, TI-83+, or TI-84+ calculators, delete the outlier from L1 and L2. Using the LinRegTTest, found under Stat and Tests, the new line of best fit and correlation coefficient are the following:

  and
 .
The slope is now 7.39, compared to the previous slope of 4.83. This seems significant, but we need to look at the change in r-values as well. The new line shows
 , which indicates a stronger correlation than the original line, with
  since
  is closer to 1. This means the new line is a better fit to the data values. The line can better predict the final exam score given the third exam score. It also means the outlier of (65, 175) was an influential point, since there is a sizeable difference in r-values. We must now decide whether to delete the outlier. If the outlier was recorded erroneously, it should certainly be deleted. Because it produces such a profound effect on the correlation, the new line of best fit allows for better prediction and an overall stronger model.
You may use Excel to graph the two least-squares regression lines and compare the slopes and fit of the lines to the data, as shown in .
You can see that the second graph shows less deviation from the line of best fit. It is clear that omission of the influential point produced a line of best fit that more closely models the data.

### Numerical Identification of Outliers: Calculating s and Finding Outliers Manually

If you do not have the function LinRegTTest on your calculator, then you must calculate the outlier in the first example by doing the following.

First, square each |y – ŷ|.
The squares are

Then, add (sum) all the |y – ŷ| squared terms using the formula

  (Recall that yi – ŷi = εi).
= 352 + 172 + 162 + 62 + 192 + 92 + 32 + 12 + 102 + 92 + 12
= 2,440 =  SSE.
The result, SSE, is the sum of squared errors.
Next, calculate s, the standard deviation of all the y – ŷ = ε-values where n = the total number of data points.
The calculation is .
For the third exam/final exam example,
Next, multiply s by 2:
(2)(16.47) = 32.94
32.94 is two standard deviations away from the mean of the y – ŷ values.
If we were to measure the vertical distance from any data point to the corresponding point on the line of best fit and that distance is at least 2s, then we would consider the data point to be too far from the line of best fit. We call that point a potential outlier.
For the example, if any of the |y – ŷ| values are at least 32.94, the corresponding (x, y) data point is a potential outlier.
For the third exam/final exam example, all the |y – ŷ| values are less than 31.29 except for the first one, which is 35:
35 > 31.29. That is, |y – ŷ| ≥ (2)(s).
The point that corresponds to |y – ŷ| = 35 is (65, 175). Therefore, the data point (65, 175) is a potential outlier. For this example, we will delete it. (Remember, we do not always delete an outlier.)

The next step is to compute a new best-fit line using the 10 remaining points. The new line of best fit and the correlation coefficient are
ŷ = –355.19 + 7.39x and r = .9121.

### 95 Percent Critical Values of the Sample Correlation Coefficient Table

### References

Committee on Ways and Means, U.S. House of Representatives. (n.d.). Washington, DC: U.S. Department of Health and Human Services.
Microsoft Bookshelf. (n.d.).
Physicians Desk Reference Staff. (1990). Physicians desk reference. Ohio: Medical Economics Company.
U.S. Bureau of Labor Statistics. (n.d.). Retrieved from https://www.bls.gov/

### Chapter Review

To determine whether a point is an outlier, do one of the following:

Use the following information to answer the next four exercises. The scatter plot shows the relationship between hours spent studying and exam scores. The line shown is the calculated line of best fit. The correlation coefficient is 0.69.

### Homework

### Bring It Together

Use the following information to answer the next two exercises. The cost of a leading liquid laundry detergent in different sizes is given in .


# F Distribution and One-way Anova

## Introduction

Many statistical applications in psychology, social science, business administration, and the natural sciences involve several groups. For example, an environmentalist is interested in knowing if the average amount of pollution varies among several bodies of water. A sociologist is interested in knowing if the amount of income a person earns varies according to his or her upbringing. A consumer looking for a new car might compare the average gas mileage of several models.
For hypothesis tests comparing averages across more than two groups, statisticians have developed a method called analysis of variance (abbreviated ANOVA). In this chapter, you will study the simplest form of ANOVA called single factor or one-way ANOVA. You will also study the F distribution, used for one-way ANOVA, and the test of two variances. This is a very brief overview of one-way ANOVA. You will study this topic in much greater detail in future statistics courses. One-way ANOVA, as it is presented here, relies heavily on a calculator or computer.


# F Distribution and One-way Anova

## One-Way ANOVA

The purpose of a one-way ANOVA test is to determine the existence of a statistically significant difference among several group means. The test uses variances to help determine if the means are equal or not. To perform a one-way ANOVA test, there are five basic assumptions to be fulfilled:
1. Each population from which a sample is taken is assumed to be normal.
2. All samples are randomly selected and independent.
3. The populations are assumed to have equal standard deviations (or variances).
4. The factor is a categorical variable.
5. The response is a numerical variable.

### The Null and Alternative Hypotheses

The null hypothesis is that all the group population means are the same. The alternative hypothesis is that at least one pair of means is different. For example, if there are k groups
H: μ1 = μ2 = μ3 = ... = μ
H: At least two of the group means μ1, μ2, μ3, ..., μ are not equal. That is, μ ≠ μ for some i ≠ j.
The graphs, a set of box plots representing the distribution of values with the group means indicated by a horizontal line through the box, help in the understanding of the hypothesis test. In the first graph (red box plots), H: μ = μ = μ and the three populations have the same distribution if the null hypothesis is true.  The variance of the combined data is approximately the same as the variance of each of the populations.
If the null hypothesis is false, then the variance of the combined data is larger, which is caused by the different means as shown in the second graph (green box plots).

### Chapter Review

Analysis of variance extends the comparison of two groups to several, each a level of a categorical variable (factor). Samples from each group are independent and must be randomly selected from normal populations with equal variances. We test the null hypothesis of equal means of the response in every group versus the alternative hypothesis of one or more group means being different from the others. A one-way ANOVA hypothesis test determines if several population means are equal. The distribution for the test is the F distribution with two different degrees of freedom.
2. Each population from which a sample is taken is assumed to be normal.
3. All samples are randomly selected and independent.
4. The populations are assumed to have equal standard deviations (or variances).
Use the following information to answer the next five exercises. There are five basic assumptions that must be fulfilled to perform a one-way ANOVA test. What are they?

### Homework


# F Distribution and One-way Anova

## The F Distribution and the F Ratio

The distribution used for the hypothesis test is a new one. It is called the , named after Sir Ronald Fisher, an English statistician. The F statistic is a ratio (a fraction). There are two sets of degrees of freedom: one for the numerator and one for the denominator.
For example, if F follows an F distribution and the number of degrees of freedom for the numerator is 4, and the number of degrees of freedom for the denominator is 10, then F ~ F.
To calculate the , two estimates of the variance are made.
1. Variance between samples: an estimate of σ2 that is the variance of the sample means multiplied by n, when the sample sizes are the same. If the samples are different sizes, the variance between samples is weighted to account for the different sample sizes. The variance is also called variation due to treatment or explained variation.
2. Variance within samples: an estimate of σ2 that is the average of the sample variances, also known as a pooled variance. When the sample sizes are different, the variance within samples is weighted. The variance is also called the variation due to error or unexplained variation.
1. SSbetween = the sum of squares that represents the variation among the different samples
2. SSwithin = the sum of squares that represents the variation within samples that is due to chance
To find a sum of squares mean, add together squared quantities which, in some
cases, may be weighted. We used sum of squares to calculate the sample variance and the sample standard deviation in Descriptive Statistics.
MS means mean square. MSbetween is the variance between groups, and MSwithin is the variance within groups.
2. k = the number of different groups
3. n = the size of the j group
4. s = the sum of the values in the j group
5. n = total number of all the values combined (total sample size: ∑n)
6. x = one value: ∑x = ∑s
7. Sum of squares of all values from every group combined: ∑x2
8. Between group variability: SStotal = ∑x2 –

9. Total sum of squares: ∑x2 –

10. Explained variation: sum of squares representing variation among the different samples

11. Unexplained variation: sum of squares representing variation within samples due to chance

12. dfs for different groups (dfs for the numerator): df = k – 1
13. Equation for errors within samples (dfs for the denominator): dfwithin = n – k
14. Mean square (variance estimate) explained by the different groups: MSbetween =

15. Mean square (variance estimate) that is due to chance (unexplained): MSwithin =

MSbetween and MSwithin can be written as follows:
1.

2.

The one-way ANOVA test depends on the fact that MSbetween can be influenced by population differences among means of the several groups. Since MSwithin compares values of each group to its own group mean, the fact that group means might be different does not affect MSwithin.
The null hypothesis says that all groups are samples from populations having the same normal distribution. The alternate hypothesis says that at least two of the sample groups come from populations with different normal distributions. If the null hypothesis is true, MSbetween and MSwithin should both estimate the same value.

If MSbetween and MSwithin estimate the same value, following the belief that H is true, then the F ratio should be approximately equal to 1. Mostly, just sampling errors would contribute to variations away from 1. As it turns out, MSbetween consists of the population variance plus a variance produced from the differences between the samples. MSwithin is an estimate of the population variance. Since variances are always positive, if the null hypothesis is false, MSbetween will generally be larger than MSwithin. Then the F ratio will be larger than 1. However, if the population effect is small, it is not unlikely that MSwithin will be larger in a given sample.
The previous calculations were done with groups of different sizes. If the groups are the same size, the calculations simplify somewhat and the F ratio can be written as  follows:

2. n = the sample size
3.  dfnumerator = k – 1
4.  dfdenominator = n – k
5. s2 pooled = the mean of the sample variances (pooled variance)
6.
  = the variance of the sample means
Data is typically put into a table for easy viewing.  One-way ANOVA results are often displayed in this manner by computer software.

The one-way ANOVA hypothesis test is always right-tailed because larger F values are way out in the right tail of the F distribution curve and tend to make us reject H.

### Notation

The notation for the F distribution is F ~ F,
where df(num) = dfbetween and df(denom) = dfwithin.
The mean for the F distribution is

### References

Marist College School of Science. (n.d.). Tomato data (Unpublished student research). Marist College School of Science, Poughkeepsie, NY.

### Chapter Review

Analysis of variance compares the means of a response variable for several groups. ANOVA compares the variation within each group to the variation of the mean of each group. The ratio of these two is the F statistic from an F distribution with (number of groups – 1) as the numerator degrees of freedom and (number of observations – number of groups) as the denominator degrees of freedom.  These statistics are summarized in the ANOVA table.

### Formula Review

dfbetween = df(num) = k – 1
dfwithin = df(denom) = n – k
MSbetween =

MSwithin =

F =

F ratio when the groups are the same size: F =

Mean of the F distribution:  µ =

where

Use the following information to answer the next seven exercises. Groups of men from three different areas of the country are to be tested for mean weight. The entries in  are the weights for the different groups.
Use the following information to answer the next eight exercises. Girls from four different soccer teams are to be tested for mean goals scored per game. The entries in  are the goals per game for the different teams.

### Homework

Use the following information to answer the next three exercises. Suppose a group is interested in determining whether teenagers obtain their drivers licenses at approximately the same average age across the country.
Suppose that the following data are randomly collected from five teenagers in each region of the country. The numbers represent the age at which teenagers obtained their drivers licenses.

H: µ1 = µ2 = µ3 = µ4 = µ5
Hα: At least any two of the group means µ1, µ2, …, µ5 are not equal.


# F Distribution and One-way Anova

## Facts About the F Distribution

The following are facts about the F distribution:
1. The curve is not symmetrical but skewed to the right.
2. There is a different curve for each set of dfs.
3. The F statistic is greater than or equal to zero.
4. As the degrees of freedom for the numerator and for the denominator get larger, the curve approximates the normal.
5. Other uses for the F distribution include comparing two variances and two-way analysis of variance. Two-way analysis is beyond the scope of this chapter.

### References

ESPN. (2012). MLB standings  2012. Retrieved from http://espn.go.com/mlb/standings/_/year/2012.
Hand, D. J. et al. (1994). A Handbook of Small Datasets: Data for Fruitfly Fecundity. London: Chapman & Hall.
Hand, D. J. et al. (1994). A Handbook of Small Datasets. London: Chapman & Hall, p. 50.
Hand. A Handbook of Small Datasets. p. 118.
Mackowiak, P. A.,Wasserman, S. S., & Levine, M. M. (1992). A critical appraisal of 98.6 degrees F, the upper limit of the normal body temperature, and other legacies of Carl Reinhold August Wunderlich. Journal of the American Medical Association, 268, 15781580.
Private K12 school in San Jose, CA. (1994). Data from a fourth grade classroom.

### Chapter Review

The graph of the F distribution is always positive and skewed right, though the shape can be mounded or exponential depending on the combination of numerator and denominator degrees of freedom. The F statistic is the ratio of a measure of the variation in the group means to a similar measure of the variation within the groups. If the null hypothesis is correct, then the numerator should be small compared to the denominator. A small F statistic will result, and the area under the F curve to the right will be large, representing a large p-value. When the null hypothesis of equal group means is incorrect, then the numerator should be large compared to the denominator, giving a large F statistic and a small area (small p-value) to the right of the statistic under the F curve.
When the data have unequal group sizes (unbalanced data), then techniques from The F Distribution and the F Ratio need to be used for hand calculations. In the case of balanced data, where the groups are the same size, simplified calculations based on group means and variances may be used. In practice, software is usually employed in the analysis. As in any analysis, graphs of various sorts should be used in conjunction with numerical techniques. Always look at your data!
Use the following information to answer the next seven exercises. Four basketball teams took a random sample of players regarding how high each player can jump (in inches). The results are shown in .
Use the following information to answer the next seven exercises. A video game developer is testing a new game on three different groups. Each group represents a different target market for the game. The developer collects scores from a random sample from each group. The results are shown in .
Use the following information to answer the next three exercises. Suppose a group is interested in determining whether teenagers obtain their drivers licenses at approximately the same average age across the country. Suppose that the following data are randomly collected from five teenagers in each region of the country. The numbers represent the age at which teenagers obtained their drivers licenses.

Enter the data into your calculator or computer.
State the decisions and conclusions (in complete sentences) for the following preconceived levels of α.

### Homework

Use the following information to answer the next two exercises.  lists the number of pages in four different types of magazines.


# F Distribution and One-way Anova

## Test of Two Variances

Another use of the F distribution is testing two variances. It is often desirable to compare two variances rather than two averages. For instance, college administrators would like two college professors grading exams to have the same variation in their grading. For a lid to fit a container, the variation in the lid and the container should be the same. A supermarket might be interested in the variability of check-out times for two checkers.
To perform a F test of two variances, it is important that the following are true:

Unlike most other tests in this book, the F test for equality of two variances is very sensitive to deviations from normality. If the two distributions are not normal, the test can give higher p-values than it should, or lower ones, in ways that are unpredictable. Many texts suggest that students not use this test at all, but in the interest of completeness we include it here.
Suppose we sample randomly from two independent normal populations. Let
  and
  be the population variances and
  and
  be the sample variances. Let the
sample sizes be n1 and n2. Since we are interested in comparing the two sample variances, we use the F ratio

F has the distribution F ~ F(n1 – 1, n2 – 1),
where n1 – 1 are the degrees of freedom for the numerator and n2 – 1 are the degrees of freedom for the denominator.
If the null hypothesis is
 , then the F ratio becomes
 .
If the two populations have equal variances, then
  and
  are close in value and
  is close to 1. But if the two population variances are very different,
  and
  tend to be very different, too. Choosing
  as the larger sample variance causes the ratio
  to be greater than 1. If
  and
  are far apart, then
  is a large number.
Therefore, if F is close to 1, the evidence favors the null hypothesis (the two population variances are equal). But if F is much larger than 1, then the evidence is against the null hypothesis. A test of two variances may be left-tailed, right-tailed, or two-tailed.

### References

ESPN. (2012). MLB standings  2012. Retrieved from http://espn.go.com/mlb/standings/_/year/2012/type/vs-division/order/true.

### Chapter Review

The F test for the equality of two variances rests heavily on the assumption of normal distributions. The test is unreliable if this assumption is not met. If both distributions are normal, then the ratio of the two sample variances is distributed as an F statistic, with numerator and denominator degrees of freedom that are one less than the samples sizes of the corresponding two groups. A test of two variances hypothesis test determines if two variances are the same. The distribution for the hypothesis test is the F distribution with two different degrees of freedom.
2. The populations from which the two samples are drawn are normally distributed.
3. The two populations are independent of each other.

### Formula Review

F has the distribution F ~ F(n1 – 1, n2 – 1)
F =

If σ1 = σ2, then F =

Use the following information to answer the next two exercises. There are two assumptions that must be true to perform an F test of two variances.
Use the following information to answer the next seven exercises. Two coworkers commute from the same building. They are interested in whether there is any variation in the time it takes them to drive to work. They each record their times for 20 commutes. The first worker’s times have a variance of 12.1. The second worker’s times have a variance of 16.9. The first worker thinks that he is more consistent with his commute times. Test the claim at the 10 percent level. Assume that commute times are normally distributed.
Use the following information to answer the next four exercises. Two students are interested in whether there is variation in their test scores for math class. There are 15 total math tests they have taken so far. The first student’s grades have a standard deviation of 38.1. The second student’s grades have a standard deviation of 22.5. The second student thinks his scores are more consistent.
Use the following information to answer the next three exercises. Two cyclists are comparing the variances of their overall paces going uphill. Each cyclist records his or her speeds going up 35 hills. The first cyclist has a variance of 23.8, and the second cyclist has a variance of 32.1. The cyclists want to see if their variances are the same or different. Assume that speeds are normally distributed.

### Homework

Use the following information to answer the next two exercises. The following table lists the number of pages in four different types of magazines.


# What is Physics?

## Introduction

Take a look at the image above of the Andromeda Galaxy (), which contains billions of stars. This galaxy is the nearest one to our own galaxy (the Milky Way) but is still a staggering 2.5 million light years from Earth. (A light year is a measurement of the distance light travels in a year.) Yet, the primary force that affects the movement of stars within Andromeda is the same force that we contend with here on Earth—namely, gravity.
You may soon realize that physics plays a much larger role in your life than you thought. This section introduces you to the realm of physics, and discusses applications of physics in other disciplines of study. It also describes the methods by which science is done, and how scientists communicate their results to each other.


# What is Physics?

## Physics: Definitions and Applications

### Section Key Terms

### What Physics Is

Think about all of the technological devices that you use on a regular basis. Computers, wireless internet, smart phones, tablets, global positioning system (GPS), MP3 players, and satellite radio might come to mind. Next, think about the most exciting modern technologies that you have heard about in the news, such as trains that levitate above their tracks, invisibility cloaks that bend light around them, and microscopic robots that fight diseased cells in our bodies. All of these groundbreaking advancements rely on the principles of physics.
Physics is a branch of science. The word science comes from a Latin word that means having knowledge, and refers to the knowledge of how the physical world operates, based on objective evidence determined through observation and experimentation. A key requirement of any scientific explanation of a natural phenomenon is that it must be testable; one must be able to devise and conduct an experimental investigation that either supports or refutes the explanation. It is important to note that some questions fall outside the realm of science precisely because they deal with phenomena that are not scientifically testable. This need for objective evidence helps define the investigative process scientists follow, which will be described later in this chapter.
Physics is the science aimed at describing the fundamental aspects of our universe. This includes what things are in it, what properties of those things are noticeable, and what processes those things or their properties undergo. In simpler terms, physics attempts to describe the basic mechanisms that make our universe behave the way it does. For example, consider a smart phone (). Physics describes how electric current interacts with the various circuits inside the device. This knowledge helps engineers select the appropriate materials and circuit layout when building the smart phone. Next, consider a GPS. Physics describes the relationship between the speed of an object, the distance over which it travels, and the time it takes to travel that distance. When you use a GPS device in a vehicle, it utilizes these physics relationships to determine the travel time from one location to another.
As our technology evolved over the centuries, physics expanded into many branches. Ancient peoples could only study things that they could see with the naked eye or otherwise experience without the aid of scientific equipment. This included the study of kinematics, which is the study of moving objects. For example, ancient people often studied the apparent motion of objects in the sky, such as the sun, moon, and stars. This is evident in the construction of prehistoric astronomical observatories, such as Stonehenge in England (shown in ).
Ancient people also studied statics and dynamics, which focus on how objects start moving, stop moving, and change speed and direction in response to forces that push or pull on the objects. This early interest in kinematics and dynamics allowed humans to invent simple machines, such as the lever, the pulley, the ramp, and the wheel. These simple machines were gradually combined and integrated to produce more complicated machines, such as wagons and cranes. Machines allowed humans to gradually do more work more effectively in less time, allowing them to create larger and more complicated buildings and structures, many of which still exist today from ancient times.
As technology advanced, the branches of physics diversified even more. These include branches such as acoustics, the study of sound, and optics, the study of the light. In 1608, the invention of the telescope by a Germany spectacle maker, Hans Lippershey, led to huge breakthroughs in astronomythe study of objects or phenomena in space. One year later, in 1609, Galileo Galilei began the first studies of the solar system and the universe using a telescope. During the Renaissance era, Isaac Newton used observations made by Galileo to construct his three laws of motion. These laws were the standard for studying kinematics and dynamics even today.
Another major branch of physics is thermodynamics, which includes the study of thermal energy and the transfer of heat. James Prescott Joule, an English physicist, studied the nature of heat and its relationship to work. Joule’s work helped lay the foundation for the first of three laws of thermodynamics that describe how energy in our universe is transferred from one object to another or transformed from one form to another. Studies in thermodynamics were motivated by the need to make engines more efficient, keep people safe from the elements, and preserve food.
The 18th and 19th centuries also saw great strides in the study of electricity and magnetism. Electricity involves the study of electric charges and their movements. Magnetism had long ago been noticed as an attractive force between a magnetized object and a metal like iron, or between the opposite poles (North and South) of two magnetized objects. In 1820, Danish physicist Hans Christian Oersted showed that electric currents create magnetic fields. In 1831, English inventor Michael Faraday showed that moving a wire through a magnetic field could induce an electric current. These studies led to the inventions of the electric motor and electric generator, which revolutionized human life by bringing electricity and magnetism into our machines.
The end of the 19th century saw the discovery of radioactive substances by the scientists Marie and Pierre Curie. Nuclear physics involves studying the nuclei of atoms, the source of nuclear radiation. In the 20th century, the study of nuclear physics eventually led to the ability to split the nucleus of an atom, a process called nuclear fission. This process is the basis for nuclear power plants and nuclear weapons. Also, the field of quantum mechanics, which involves the mechanics of atoms and molecules, saw great strides during the 20th century as our understanding of atoms and subatomic particles increased (see below).
Early in the 20th century, Albert Einstein revolutionized several branches of physics, especially relativity. Relativity revolutionized our understanding of motion and the universe in general as described further in this chapter. Now, in the 21st century, physicists continue to study these and many other branches of physics.
By studying the most important topics in physics, you will gain analytical abilities that will enable you to apply physics far beyond the scope of what can be included in a single book. These analytical skills will help you to excel academically, and they will also help you to think critically in any career you choose to pursue.

### Physics: Past and Present

The word physics is thought to come from the Greek word phusis, meaning nature. The study of nature later came to be called natural philosophy. From ancient times through the Renaissance, natural philosophy encompassed many fields, including astronomy, biology, chemistry, mathematics, and medicine. Over the last few centuries, the growth of scientific knowledge has resulted in ever-increasing specialization and branching of natural philosophy into separate fields, with physics retaining the most basic facets. Physics, as it developed from the Renaissance to the end of the 19th century, is called classical physics. Revolutionary discoveries starting at the beginning of the 20th century transformed physics from classical physics to modern physics.
Classical physics is not an exact description of the universe, but it is an excellent approximation under the following conditions: (1) matter must be moving at speeds less than about 1 percent of the speed of light, (2) the objects dealt with must be large enough to be seen with the naked eye, and (3) only weak gravity, such as that generated by Earth, can be involved. Very small objects, such as atoms and molecules, cannot be adequately explained by classical physics. These three conditions apply to almost all of everyday experience. As a result, most aspects of classical physics should make sense on an intuitive level.
Many laws of classical physics have been modified during the 20th century, resulting in revolutionary changes in technology, society, and our view of the universe. As a result, many aspects of modern physics, which occur outside of the range of our everyday experience, may seem bizarre or unbelievable. So why is most of this textbook devoted to classical physics? There are two main reasons. The first is that knowledge of classical physics is necessary to understand modern physics. The second reason is that classical physics still gives an accurate description of the universe under a wide range of everyday circumstances.
Modern physics includes two revolutionary theories: relativity and quantum mechanics. These theories deal with the very fast and the very small, respectively. The theory of relativity was developed by Albert Einstein in 1905. By examining how two observers moving relative to each other would see the same phenomena, Einstein devised radical new ideas about time and space. He came to the startling conclusion that the measured length of an object travelling at high speeds (greater than about one percent of the speed of light) is shorter than the same object measured at rest. Perhaps even more bizarre is the idea that the time for the same process to occur is different depending on the motion of the observer. Time passes more slowly for an object travelling at high speeds. A trip to the nearest star system, Alpha Centauri, might take an astronaut 4.5 Earth years if the ship travels near the speed of light. However, because time is slowed at higher speeds, the astronaut would age only 0.5 years during the trip. Einstein’s ideas of relativity were accepted after they were confirmed by numerous experiments.
Gravity, the force that holds us to Earth, can also affect time and space. For example, time passes more slowly on Earth’s surface than for objects farther from the surface, such as a satellite in orbit. The very accurate clocks on global positioning satellites have to correct for this. They slowly keep getting ahead of clocks at Earth’s surface. This is called time dilation, and it occurs because gravity, in essence, slows down time.
Large objects, like Earth, have strong enough gravity to distort space. To visualize this idea, think about a bowling ball placed on a trampoline. The bowling ball depresses or curves the surface of the trampoline. If you rolled a marble across the trampoline, it would follow the surface of the trampoline, roll into the depression caused by the bowling ball, and hit the ball. Similarly, the Earth curves space around it in the shape of a funnel. These curves in space due to the Earth cause objects to be attracted to Earth (i.e., gravity).
Because of the way gravity affects space and time, Einstein stated that gravity affects the space-time continuum, as illustrated in . This is why time proceeds more slowly at Earth’s surface than in orbit. In black holes, whose gravity is hundreds of times that of Earth, time passes so slowly that it would appear to a far-away observer to have stopped!
In summary, relativity says that in describing the universe, it is important to realize that time, space and speed are not absolute. Instead, they can appear different to different observers. Einstein’s ability to reason out relativity is even more amazing because we cannot see the effects of relativity in our everyday lives.
Quantum mechanics is the second major theory of modern physics. Quantum mechanics deals with the very small, namely, the subatomic particles that make up atoms. Atoms () are the smallest units of elements. However, atoms themselves are constructed of even smaller subatomic particles, such as protons, neutrons and electrons. Quantum mechanics strives to describe the properties and behavior of these and other subatomic particles. Often, these particles do not behave in the ways expected by classical physics.
At particle colliders (), such as the Large Hadron Collider on the France-Swiss border, particle physicists can make subatomic particles travel at very high speeds within a 27 kilometers (17 miles) long superconducting tunnel. They can then study the properties of the particles at high speeds, as well as collide them with each other to see how they exchange energy. This has led to many intriguing discoveries such as the Higgs-Boson particle, which gives matter the property of mass, and antimatter, which causes a huge energy release when it comes in contact with matter.
Physicists are currently trying to unify the two theories of modern physics, relativity and quantum mechanics, into a single, comprehensive theory called relativistic quantum mechanics. Relating the behavior of subatomic particles to gravity, time, and space will allow us to explain how the universe works in a much more comprehensive way.

### Application of Physics

You need not be a scientist to use physics. On the contrary, knowledge of physics is useful in everyday situations as well as in nonscientific professions. For example, physics can help you understand why you shouldn’t put metal in the microwave (), why a black car radiator helps remove heat in a car engine, and why a white roof helps keep the inside of a house cool. The operation of a car’s ignition system, as well as the transmission of electrical signals through our nervous system, are much easier to understand when you think about them in terms of the basic physics of electricity.
Physics is the foundation of many important scientific disciplines. For example, chemistry deals with the interactions of atoms and molecules. Not surprisingly, chemistry is rooted in atomic and molecular physics. Most branches of engineering are also applied physics. In architecture, physics is at the heart of determining structural stability, acoustics, heating, lighting, and cooling for buildings. Parts of geology, the study of nonliving parts of Earth, rely heavily on physics; including radioactive dating, earthquake analysis, and heat transfer across Earth’s surface. Indeed, some disciplines, such as biophysics and geophysics, are hybrids of physics and other disciplines.
Physics also describes the chemical processes that power the human body. Physics is involved in medical diagnostics, such as x-rays, magnetic resonance imaging (MRI), and ultrasonic blood flow measurements (). Medical therapy Physics also has many applications in biology, the study of life. For example, physics describes how cells can protect themselves using their cell walls and cell membranes (). Medical therapy sometimes directly involves physics, such as in using X-rays to diagnose health conditions. Physics can also explain what we perceive with our senses, such as how the ears detect sound or the eye detects color.
In summary, physics studies many of the most basic aspects of science. A knowledge of physics is, therefore, necessary to understand all other sciences. This is because physics explains the most basic ways in which our universe works. However, it is not necessary to formally study all applications of physics. A knowledge of the basic laws of physics will be most useful to you, so that you can use them to solve some everyday problems. In this way, the study of physics can improve your problem-solving skills.

### Check Your Understanding

### Section Summary

1. Physics is the most fundamental of the sciences, concerning itself with energy, matter, space and time, and their interactions.
2. Modern physics involves the theory of relativity, which describes how time, space and gravity are not constant in our universe can be different for different observers, and quantum mechanics, which describes the behavior of subatomic particles.
3. Physics is the basis for all other sciences, such as chemistry, biology and geology, because physics describes the fundamental way in which the universe functions.

### Concept Items

### Critical Thinking

### Test Prep Multiple Choice

### Test Prep Short Answer


# What is Physics?

## The Scientific Methods

### Section Key Terms

### Scientific Methods

Scientists often plan and carry out investigations to answer questions about the universe around us. These investigations may lead to natural laws. Such laws are intrinsic to the universe, meaning that humans did not create them and cannot change them. We can only discover and understand them. Their discovery is a very human endeavor, with all the elements of mystery, imagination, struggle, triumph, and disappointment inherent in any creative effort. The cornerstone of discovering natural laws is observation. Science must describe the universe as it is, not as we imagine or wish it to be.
We all are curious to some extent. We look around, make generalizations, and try to understand what we see. For example, we look up and wonder whether one type of cloud signals an oncoming storm. As we become serious about exploring nature, we become more organized and formal in collecting and analyzing data. We attempt greater precision, perform controlled experiments (if we can), and write down ideas about how data may be organized. We then formulate models, theories, and laws based on the data we have collected, and communicate those results with others. This, in a nutshell, describes the scientific method that scientists employ to decide scientific issues on the basis of evidence from observation and experiment.
An investigation often begins with a scientist making an observation. The scientist observes a pattern or trend within the natural world. Observation may generate questions that the scientist wishes to answer. Next, the scientist may perform some research about the topic and devise a hypothesis. A hypothesis is a testable statement that describes how something in the natural world works. In essence, a hypothesis is an educated guess that explains something about an observation.
Scientists may test the hypothesis by performing an experiment. During an experiment, the scientist collects data that will help them learn about the phenomenon they are studying. Then the scientists analyze the results of the experiment (that is, the data), often using statistical, mathematical, and/or graphical methods. From the data analysis, they draw conclusions. They may conclude that their experiment either supports or rejects their hypothesis. If the hypothesis is supported, the scientist usually goes on to test another hypothesis related to the first. If their hypothesis is rejected, they will often then test a new and different hypothesis in their effort to learn more about whatever they are studying.
Scientific processes can be applied to many situations. Let’s say that you try to turn on your car, but it will not start. You have just made an observation! You ask yourself, "Why won’t my car start?" You can now use scientific processes to answer this question. First, you generate a hypothesis such as, "The car won’t start because it has no gasoline in the gas tank." To test this hypothesis, you put gasoline in the car and try to start it again. If the car starts, then your hypothesis is supported by the experiment. If the car does not start, then your hypothesis is rejected. You will then need to think up a new hypothesis to test such as, "My car won’t start because the fuel pump is broken." Hopefully, your investigations lead you to discover why the car wont start and enable you to fix it.

### Modeling

A model is a representation of something that is often too difficult (or impossible) to study directly. Models can take the form of physical models, equations, computer programs, or simulations—computer graphics/animations. Models are tools that are especially useful in modern physics because they let us visualize phenomena that we normally cannot observe with our senses, such as very small objects or objects that move at high speeds. For example, we can understand the structure of an atom using models, without seeing an atom with our own eyes. Although images of single atoms are now possible, these images are extremely difficult to achieve and are only possible due to the success of our models. The existence of these images is a consequence rather than a source of our understanding of atoms. Models are always approximate, so they are simpler to consider than the real situation; the more complete a model is, the more complicated it must be. Models put the intangible or the extremely complex into human terms that we can visualize, discuss, and hypothesize about.
Scientific models are constructed based on the results of previous experiments. Even still, models often only describe a phenomenon partially or in a few limited situations. Some phenomena are so complex that they may be impossible to model them in their entirety, even using computers. An example is the electron cloud model of the atom in which electrons are moving around the atom’s center in distinct clouds (), that represent the likelihood of finding an electron in different places. This model helps us to visualize the structure of an atom. However, it does not show us exactly where an electron will be within its cloud at any one particular time.
As mentioned previously, physicists use a variety of models including equations, physical models, computer simulations, etc. For example, three-dimensional models are often commonly used in chemistry and physics to model molecules. Properties other than appearance or location are usually modelled using mathematics, where functions are used to show how these properties relate to one another. Processes such as the formation of a star or the planets, can also be modelled using computer simulations. Once a simulation is correctly programmed based on actual experimental data, the simulation can allow us to view processes that happened in the past or happen too quickly or slowly for us to observe directly. In addition, scientists can also run virtual experiments using computer-based models. In a model of planet formation, for example, the scientist could alter the amount or type of rocks present in space and see how it affects planet formation.
Scientists use models and experimental results to construct explanations of observations or design solutions to problems. For example, one way to make a car more fuel efficient is to reduce the friction or drag caused by air flowing around the moving car. This can be done by designing the body shape of the car to be more aerodynamic, such as by using rounded corners instead of sharp ones. Engineers can then construct physical models of the car body, place them in a wind tunnel, and examine the flow of air around the model. This can also be done mathematically in a computer simulation. The air flow pattern can be analyzed for regions smooth air flow and for eddies that indicate drag. The model of the car body may have to be altered slightly to produce the smoothest pattern of air flow (i.e., the least drag). The pattern with the least drag may be the solution to increasing fuel efficiency of the car. This solution might then be incorporated into the car design.

### Scientific Laws and Theories

A scientific law is a description of a pattern in nature that is true in all circumstances that have been studied. That is, physical laws are meant to be universal, meaning that they apply throughout the known universe. Laws are often also concise, whereas theories are more complicated. A law can be expressed in the form of a single sentence or mathematical equation. For example, Newton’s second law of motion, which relates the motion of an object to the force applied (F), the mass of the object (m), and the object’s acceleration (a), is simply stated using the equation
Scientific ideas and explanations that are true in many, but not all situations in the universe are usually called principles. An example is Pascal’s principle, which explains properties of liquids, but not solids or gases. However, the distinction between laws and principles is sometimes not carefully made in science.
A theory is an explanation for patterns in nature that is supported by much scientific evidence and verified multiple times by multiple researchers. While many people confuse theories with educated guesses or hypotheses, theories have withstood more rigorous testing and verification than hypotheses.
As a closing idea about scientific processes, we want to point out that scientific laws and theories, even those that have been supported by experiments for centuries, can still be changed by new discoveries. This is especially true when new technologies emerge that allow us to observe things that were formerly unobservable. Imagine how viewing previously invisible objects with a microscope or viewing Earth for the first time from space may have instantly changed our scientific theories and laws! What discoveries still await us in the future? The constant retesting and perfecting of our scientific laws and theories allows our knowledge of nature to progress. For this reason, many scientists are reluctant to say that their studies prove anything. By saying support instead of prove, it keeps the door open for future discoveries, even if they won’t occur for centuries or even millennia.

### Check Your Understanding

### Section Summary

1. Science seeks to discover and describe the underlying order and simplicity in nature.
2. The processes of science include observation, hypothesis, experiment, and conclusion.
3. Theories are scientific explanations that are supported by a large body experimental results.
4. Scientific laws are concise descriptions of the universe that are universally true.

### Concept Items

### Critical Thinking

### Test Prep Multiple Choice

### Test Prep Short Answer

### Test Prep Extended Response