Statistics for Dummies (49 page)

Read Statistics for Dummies Online

Authors: Deborah Jean Rumsey

Tags: #Non-Fiction, #Reference

BOOK: Statistics for Dummies
9.27Mb size Format: txt, pdf, ePub
Predicting temperature with cricket chirps

The best-fitting line for predicting temperature with cricket chirps with my subset of data was found to be
y
= 0.9
x
+ 43.2. Any equation or function that is used to estimate or predict a relationship between two variables is called a
statistical model
. Using this model, you can predict temperature using cricket chirps. How do you do it? Choose a relevant value for
x
, plug it into the model, and find the expected value for
y.

For example, if you want to predict the temperature and you know that the cricket in your backyard chirped 35 times in 15 seconds, you plug in 35 for
x
and find out what
y
is. Here goes:
y
= 0.9(35) + 43.2 = 31.5 + 43.2 = 74.7. So, knowing that the cricket chirped 35 times in 15 seconds, you can predict that the expected temperature is about 75 degrees Fahrenheit.

HEADS UP 

Just because you have a model doesn't mean you can plug in
any
value for
x
and do a good job of predicting
y.
For example, you can't plug in a number higher than 39 or lower than 18. Why not? Because, for this example, you don't have any data for
x
in those ranges (see
Table 18-1
). Who's to say the line still works outside of the area where data were collected? Do you really think that as the temperature rises higher and higher into infinity the crickets will chirp faster and faster, without limit? At some point the poor crickets would die of heat exposure. Similarly, crickets won't survive in extremely cold weather, so you can't plug in extremely low values of
x
and expect the model to work.

REMEMBER 

Making predictions using
x
values that fall outside the range of your data is a no-no. Statisticians call this
extrapolation;
watch for researchers who try to make claims beyond the range of their results.

TECHNICAL STUFF 

Because the best-fitting line is a model describing the overall relationship between
x
and
y
, you're not really predicting
y
, you're predicting the
expected
(or average) value of
y
for any given
x.

Making predictions with two associated categorical variables

After two categorical variables have been found to be associated, you can make predictions (estimates) about the percentage in each group regarding one of the variables, or you can estimate the difference between the percentages in the two groups. In both cases, you use confidence intervals to make those estimates (see
Chapters 12
and
13
).

With the aspirin versus colon polyps example given in the first section of this chapter, among the group taking aspirin, the percentage of colon cancer patients who developed polyps was 17%, compared to 27% in the non-aspirin group (refer to
Table 18-2
). The prediction you can make here is the following: If you're a colon cancer patient, you're less likely to develop a subsequent colon polyp if you take 325 mg of aspirin every day.

You can get more specific about this prediction. You can estimate the chance of a colon cancer patient developing a polyp if he or she takes aspirin every day by finding a confidence interval. Because 17% of the sample of aspirin takers developed polyps, this means that the chance that any individual in that population (that is, colon cancer patients) will develop subsequent polyps if they take aspirin every day is 0.17, plus or minus the margin of error, or in this case, plus or minus 0.04. In other words, for a colon cancer patient taking 325 mg of aspirin daily, the chance of developing subsequent polyps is anywhere from 17%

4% to 17% + 4%, or from 13% to 21%. (See
Chapter 13
for the formula for a confidence interval for a single population proportion,
p
, and
Chapter 10
for finding the margin of error.)

Another way to make predictions in this situation is to estimate the decreased risk of developing polyps, should the patients take an aspirin every day. This can be accomplished by calculating a confidence interval for the difference between the two proportions, where
p
1
is the proportion of patients in the control group who developed polyps, and
p
2
is the proportion of patients in the aspirin group who developed polyps. The difference you're interested in here is
p
1

p
2
. This confidence interval is 0.27

0.17 = 0.10, plus or minus the margin of error, or, in this case, plus or minus 0.03. So, if you're a colon cancer patient taking aspirin each day, your risk of developing subsequent polyps decreases anywhere from 10%

3% to 10% + 3%, or from 7% to 13%. (See
Chapter 13
for the formula for a confidence interval for the difference between two population proportions.)

 

Chapter 19:
Statistics and Toothpaste—Quality Control

The most successful manufacturing companies are all about quality control. They want you, as a customer, to be satisfied with their products and buy them again and again. They want you to be so pleased that you'll tell your friends, neighbors, coworkers, and even people on the street how wonderful their products are. How do companies ensure that you're going to be satisfied with their products? One criterion for customer satisfaction is product quality, and believe it or not, the field of statistics plays a vital role in the assessment of product quality and in quality improvement. This chapter shows you how.

Full-Filling Expectations

Customers expect products to fulfill their expectations, and one expectation is that a package contains the amount of product that was promised. Another expectation is a certain level of consistency each time the product is purchased. How full do you expect a bag of potato chips to be? Doesn't it seem strange that an 8-ounce bag of potato chips can look so large yet actually contain so few potato chips? (Manufacturers say they insert air into the package before sealing it in order to protect the product from damage.) If the package labeling indicates that the weight of the package is 8 ounces, and the package contains 8 ounces, you really can't complain. But will you feel slighted if the bag turns out to be underfilled?

Suppose the package says it contains 8 ounces but it actually contains only 7.8 ounces; will you get upset? You probably wouldn't even notice that amount of difference. But what if the bag contains only 6 ounces of chips? How about 4 ounces? At some point, you're going to notice. And what will your reaction be? You may:

  • Just let it slide (unless the problem happens again and again).

  • Return the product to the store and demand a refund.

  • Write a letter to the company and complain.

  • Decide not to buy the product again.

  • Complain to the Better Business Bureau (BBB) or a government agency.

  • Organize a boycott of the product.

  • Try to get a job with the company to be "part of the solution instead of part of the problem."

Now, some of these options may seem a bit over the top, especially if you got cheated out of only a couple of handfuls of potato chips. But suppose you bought a new car that turned out to be a lemon, your child almost choked on a part that came loose in his crib, or you got sick from some hamburger that you bought at the store yesterday. Quality can be a critical and serious issue. Although standards for many consumer products are developed and enforced by the U.S. government (for example, the Food and Drug Administration), problems do arise from time to time in the manufacturing process. Here are just a few of the factors that can affect the quality of a product during production:

  • The employees perform inconsistently (due to differences in skill levels, training, and working conditions, or due to the effect of shift changes, poor morale, human error, and so on).

  • The managers and/or supervisors are inconsistent or unclear about expectations and/or their responses to problems that arise.

  • The production equipment performs inconsistently (due to the equipment not being sufficiently maintained, parts wearing out, machines breaking down or malfunctioning, or simply because of differences between individual machines or manufacturing lines).

  • The machines and equipment aren't designed to be precise or sensitive enough.

  • The raw materials used in the manufacturing process are inconsistent.

  • The environment (temperature, humidity, air purity, and so on) isn't consistently controlled.

  • The monitoring process is insufficient or inefficient.

Spurred on by the need to please customers and follow government regulations, successful manufacturers are always looking for ways to improve the quality of their products. One popular phrase used by the manufacturing industry is total quality management, or TQM.
Total quality management
focuses on developing ways to continually monitor, assess, and improve the manufacturing process from the beginning of the process to the end. TQM was popularized in the United States by a famous and beloved statistician, Dr. W. Edwards Deming, who developed a nationally known and often-used list called "14 Points for Management." Deming's philosophy was that if you build quality into the product in the first place, you'll lower costs, increase productivity, and be more competitive.

How do statistics factor into product quality? Statistics are used to determine and set specifications and to monitor all aspects of the manufacturing process to ensure that those specifications are met. Statistics are used to help decide when a process needs to be stopped, as well as to identify problems before they occur. In an overall sense, statistical data provide feedback (often continuously) to the manufacturer about product quality as part of the total quality management philosophy. The role of statistics in monitoring and improving product quality throughout the manufacturing process is called
statistical process control
(SPC). The subject of statistical process control can fill up an entire book by itself; however, you can get a very good sense of how statistics factor into quality control by understanding and applying some of the basic ideas discussed in the following sections.

 

Squeezing Quality out of a Toothpaste Tube

Although consumers appear to have reached a level of acceptance that potato chip bags will always be (or at least seem to be) woefully underfilled, they still hold toothpaste tubes to a higher standard, expecting them to be consistently filled to the top. (Toothpaste manufacturers must know how hard you struggle to squeeze that last bit of toothpaste out of the tube.)

Thankfully, the tube-filling industry (which includes its own Tube Council) rises to the occasion and takes the whole tube-filling concept very seriously. You can even find "Tube-Filling Frequently Asked Questions" on a Web site set up by one of the companies specializing in this area. One of these frequently asked questions addresses the issue of how quality is ensured in tube filling.

The goals of the tube-filling equipment, according to the industry, are accuracy and consistency. The dosing mechanism is the key to achieving these goals. (
Dosing mechanism
is the industry's lingo for the machine that actually fills the tubes.) The following are some important features of toothpaste-tube-dosing equipment:

  • A mechanism for properly cutting off the flow, to eliminate drip or stringing

  • A system to eliminate air in the filling process

  • A mechanism that stops the machine from trying to fill tubes that, for some reason, are missing

  • A system that's designed for rapid cleaning and changeover

If this level of complexity and attention to detail is required for quality in toothpaste-tube filling, just imagine what must be involved in building quality into passenger jets!

It turns out that tube-fill quality is affected by several factors, including those listed in the preceding bullet list. Problems that toothpaste manufacturers want to avoid include underfilling (mainly due to air pockets) and overfilling (resulting in tubes that "give way", to use the tube-filling industry's term; overfilling also results in giving some of the product away for free, which eats into profits). The dimensions of the inside of the tube can also play a role in tube-fill quality. For example, undersized tubes (even though they're filled with the proper amount of toothpaste) will bulge when sealed, and oversized tubes will give the appearance of being underfilled.

Understanding that quality = accuracy + consistency

Statistics are certainly involved in providing the data necessary to evaluate tube-filling equipment on each of the criteria listed in the preceding section. However, the role of statistics in the manufacturing process is most clearly emphasized by the manufacturer's criterion for quality in the tube-filling process: consistency and accuracy. The words
consistent
and
accurate
scream statistics louder than any other words in the manufacturing industry; they basically say it all.

Accuracy and consistency are monitored statistically by using control charts. A
control chart
is a specialized time chart that displays the values of the data in the order in which they were collected over time (see
Chapter 4
for more information on time charts). Control charts use a line to denote where the manufacturer's specified value — or
target value
— is (this deals with the accuracy issue) and boundaries to indicate how far above or below the target the values are expected to be (this deals with the consistency part). The values being charted represent weights, volumes, or counts from individual products or, as is more often the case, they represent average weights, average volumes, or average counts from samples of products. The upper and lower boundaries of a control chart are called the
upper control limit (UCL)
and the
lower control limit (LCL).

For example, suppose a candy maker is filling bags of sour candies, and the target value is 50 pieces per bag, with the LCL = 45 pieces, and the UCL = 55 pieces. Suppose 8 bags of candy are sampled, their candies are counted, and the results are found to be as follows: 51 pieces, 53 pieces, 49 pieces, 51 pieces, 54 pieces, 47 pieces, 52 pieces, and 45 pieces.
Figure 19-1
shows a picture of the resulting control chart for this process. This process (at least for the time being) seems to be in control.

Figure 19-1:
Control chart for candy-filling process.
Using control charts to monitor quality

To use statistics to monitor quality, you first have to figure out a way to define and measure accuracy and consistency. Then you have to set the target value, determine the upper and lower control limits, and collect data from the process. The data then need to be recorded on the control chart, and the process needs to be monitored to determine whether the process is in control. This last step can be a tricky decision. On the one hand, you don't want to stop the process with a false alarm (which you could be doing if you stopped it the first time a value went outside of the control limits). On the other hand, you don't want to let the process get out of control if it's beginning to produce inferior products.

Defining accuracy

What does it mean for a toothpaste tube-filling machine to be accurate? It means that the tubes weigh, in the end, what they're supposed to weigh, on
average. Notice that I said "on average." I think you would agree that even the most sophisticated manufacturing process isn't perfect; some variation in any process is normal due to random fluctuation. This means that you can't expect every single tube of toothpaste to weigh exactly 6.4 ounces. However, if the tube weights start drifting lower and lower in terms of their actual weight, or if they suddenly contain a great deal of air and don't weigh what they should, consumers will notice, and the quality of the product will be compromised. Similarly, if the average weight drifts upward, the manufacturer loses money because it's giving away extra product.

Statistically speaking, product weights are
accurate
if they don't contain any bias or systematic error. (
Systematic error
leads to values that are consistently high or consistently low, compared to the expected value.) This falls right in line with the tube-filling industry's concept of accuracy. In this case the expected value (target value) is the specification set by the manufacturer, such as 6.4 ounces.

Defining consistency

What does it mean for a toothpaste tube-filling machine to be consistent? It means that the tube weights stay within the control limits most of the time. Notice I said "most of the time." Again, some variation in any process is normal due to random fluctuation. However, if the tube weights start bouncing all over the place, the quality of the product is compromised.

Statistically speaking, weights are
consistent
if their standard deviation is small (see
Chapter 4
). How small should the standard deviation be? It depends on the manufacturer's specifications and any limitations of the process. The operators of the tube-filling machines say that their machines are accurate to within 0.5%. This means that they expect most of the tubes labeled 6.4 ounces to weigh within 0.032 ounces of the target value (because 0.5% of 6.4 is 0.005 × 6.4 = 0.032 ounces). Suppose you assume that they want 95% of the tubes to be within that range. How many standard deviations are needed to cover about 95% of the values around the target?

According to the empirical rule (which you can use because you can assume the weights will have a mound-shaped distribution — see
Chapter 8
), 95% of the weights will be within 2 standard deviations of the target value. So, 0.032 = 2 times the standard deviation of the weights. That means each standard deviation would be worth at most 0.032 ÷ 2 = 0.016 ounces, according to the machine manufacturer's specifications. This is a conservative estimate; manufacturers' specifications may be wider than the actual control limits they set up during their quality control testing.

Expecting a normal distribution

Even though the tubes were set to be filled to 6.4 ounces, not all of the tubes are going to come out weighing exactly 6.4 ounces, of course. Some will be over, some will be under, but you expect most of the tubes to weigh close to 6.4 ounces, with an equal percentage above and below 6.4 ounces (within the control limits), if the process is in control. Beyond having a general mound shape in the middle, the weights of the toothpaste tubes should actually have a bell-shaped, or normal distribution. (See
Chapter 8
for more about the normal distribution.) If the process is accurate, the mean of this distribution will be the target value, indicated by
μ
. And you know that the manufacturer wants the standard deviation to be no more than 0.016 ounces for consistency purposes. That means that
μ
= 6.4 ounces and
σ
= 0.016 ounces. See
Figure 19-2
.

Figure 19-2:
Distribution of individual toothpaste tube weights (where the process is in control).
TECHNICAL STUFF 

The standard deviation of a population is denoted by
σ
, and the standard deviation of a sample is denoted by
s.
(See
Chapter 5
for more on standard deviation.) In most statistical situations, the standard deviation of a population is unknown, and you use
s
to estimate it from a sample. But in the case of quality control, the standard deviation for the population of products manufactured is set by the manufacturer. The standard deviation for the population is expected to be this set value, if the process is in control.

Finding the control limits

Now that the target value has been set and the expected standard deviation has been determined, the next step in statistical process control is to set the control limits for the process.

If the manufacturer is going to weigh individual tubes of toothpaste, the control limits will be set at the target value (mean) plus or minus 2 standard deviations (for 95% confidence) or the target value (mean) plus or minus 3 standard deviations (for 99% confidence). The formulas for the control limits for the individual weights are:
μ
± 2
μ
or
μ
± 3
μ
, respectively.

The toothpaste manufacturers have set the mean at 6.4 and the standard deviation at 0.016. Suppose they want 95% confidence. This means that the control limits are 6.4 ± 2(0.016) = 6.4 ± 0.032. The LCL is 6.4

0.032 = 6.368 ounces, and the UCL is 6.4 + 0.032 = 6.432 ounces. If the manufacturers want 99% confidence, the control limits for the weights of individual tubes are 6.4 ± 3(0.016) = 6.4 ± 0.048. The LCL is 6.4

0.048 = 6.352 ounces, and the UCL is 6.4 + 0.048 = 6.448 ounces.

However, most processes are monitored by taking samples and finding the average weight of each sample, rather than looking at individual products. This means that the control limits will include the target value (mean), plus or minus 2 standard
errors
(for 95% confidence) or the target value (mean) plus or minus 3 standard
errors
(for 99% confidence). A
standard error
is the standard deviation of the sample means, and is calculated by taking the standard deviation of the weights, divided by the square root of
n
, where
n
is the sample size. (See
Chapters 9
and
10
for more on the standard error.) The notation for standard error is
The formulas for the control limits for the sample means are given by:
or
respectively

TECHNICAL STUFF 

The standard error will always be smaller than the standard deviation. That's because means are more consistent than individual values, because they're based on more data and, therefore, won't vary as much from one sample to the next. The larger the sample size is, the smaller the standard error is going to be (because with
n
in the denominator, as
n
increases, the value of the standard deviation divided by the square root of
n
decreases). See
Chapter 10
for details.

Tip 

If the process is monitored by weighing each tube as it comes through, that's the same as monitoring samples of size
n
= 1. So for
n
= 1, the formulas for standard deviation and standard error are the same (which they should be).

Suppose the size of each sample of toothpaste tubes is 10. Given that the standard deviation is set at 0.016, the standard error for the sample means (each of size 10) is
ounces. The distribution of the average weights will be normal, with mean 6.4 and standard error 0.005, if the process is in control. See
Figure 19-3
.

Figure 19-3:
Distribution of sample means of 10 toothpaste tubes each (where the process is in control).

Assuming that the toothpaste manufacturers are using 3 standard deviations for their acceptable level of consistency (to be conservative), the formula for
the control limits is
The lower control limit (LCL) is 6.4

3(0.005) = 6.4

0.015 = 6.385 ounces, and the upper control limit is 6.4 + 3(0.005) = 6.4 + 0.015 = 6.415 ounces. The target value and control limits for this particular process are shown on the control chart in
Figure 19-4
.

Figure 19-4:
Control limits for sample means of ten toothpaste tubes (99% confidence).

A control chart uses the boundaries from the normal distribution (2 or 3 standard errors above and below the mean), but it also shows the progression of the values in time order.

Other books

Making the Cut by SD Hildreth
A Fatal Verdict by Tim Vicary
Vision of Shadows by Vincent Morrone
The Italian Affair by Crossfield, Helen
The Ensnared by Palvi Sharma
Speechless (Pier 70 #3) by Nicole Edwards
Call for the Dead by John le Carre
Dressed to Killed by Milton Ozaki