Quantcast
Channel: Project Tools | Minitab
Viewing all 403 articles
Browse latest View live

Studying Old Dogs with New Statistical Tricks: Bone-Cracking Hypercarnivores and 3D Surface Plots

$
0
0

A while back my colleague Jim Frost wrote about applying statistics to decisions typically left to expert judgment; I was reminded of his post this week when I came across a new research study that takes a statistical technique commonly used in one discipline, and applies it in a new way. 

Hyena skulls: optimized for cracking bones! The study, by paleontologist Zhijie Jack Tseng, looked at how the skulls of bone-cracking carnivores--modern-day hyenas--evolved. They may look like dogs, but hyenas in fact are more closely related to cats. However, some extinct dog species had skulls much like a hyena's. 

Tseng analyzed data from 3D computer models of theoretical skulls, along with those of existing species, to test the hypotheses that specialized bone-cracking hyenas and dogs evolved similar skulls with similar biting capabilities, and that the adaptations are optimized from an engineering perspective. 

This paper is well worth reading, and if you're into statistics and/or quality, you might notice how Tseng uses 3D surface plots and contour plots to explore his data and explain his findings. That struck me because I usually see these two types of graphs used in the analysis of Design of Experiments (DoE) data, when quality practitioners are trying to optimize a process or product.

Two other factors make this even more cool: Tseng used Minitab to create the surface plots (sweet!), and  his paper and data are available to everyone who would like to work with them. When I contacted him to ask if he'd mind us using his data to demonstrate how to create a surface plot, he graciously assented and added, "In the spirit of open science and PLoS ONE's mission, the data are meant for uses exactly like the one you are planning for your blog."

So let's make (and manipulate) a surface plot in Minitab using the data from these theoretical bone-cracking skulls. If you don't already have it, download our 30-day trial of Minitab Statistical Software and follow along!

Creating a 3D Surface Plot

Three-dimensional surface plots help us see the potential relationship between three variables. Predictor variables are mapped on the x- and y-scales, and the response variable (z) is represented by a smooth surface (surface plot) or a grid (wireframe plot). Skull deepening and widening are major evolutionary patterns in convergent bone-cracking dogs and hyaenas, so Tseng used skull width-to-length and depth-to-length ratios as variables to examine optimized shapes for two functional properties: mechanical advantage (MA) and strain energy (SE). 

So, here's the step-by-step breakdown of creating a 3D surface plot in Minitab. We're going to use it to look at the relationship between the ratio of skull depth to length (D:L), width to length (W:L), and skull-strain energy (SE), a measure of bite force.

  1. Download and open the worksheet containing the data.
  2. Choose Graph > 3D Surface Plot.
  3. Choose Surface, then click OK.
  4. In Z variable, enter SE (J). In Y variable, enter D:L. In X variable, enter W:L.
  5. Click Scale, then click the Gridlines tab.
  6. I'm going to leave them off, but if you like, you can use Show gridlines for, then check Z major ticks, Y major ticks, and X major ticks. Adding the gridlines helps you visualize the peaks and valleys of the surface and determine the corresponding x- and y-values. 
  7. Click OK in each dialog box.

Minitab produces the following graph: 

Surface plot of skull-strain energy to depth/length and width/length

The "landscape" of the 3D surface plot is illuminated in places so that you can better see surface features, and you can change the position, color, and brightness of these lights to better display the data. You also can change the pattern and color of the surface. You can open the "Edit Surface" dialog box simply by double-clicking on the landscape. Here, I've tweaked the colors and lighting a bit to give more contrast: 

surface plot with alternate colors

Turn the Landscape Upside-Down

You may not want to go so far as to flip it, but rotating the graph to view the surface from different angles can help you visualize the peaks and valleys of the surface. You can rotate the graph around the X, Y, and Z axes, rotate the lights, and even zoom in with the 3D Graph Tools toolbar. (If you don't already see it,  just choose Tools > Toolbars > 3D Graph Tools to make it appear.)

3D Graph Tools toolbar in statistical software

By rotating 3D surface and wireframe plots, you can view them from different angles, which often reveals interesting information. Changing these factors can help reveal different features of the data surface and dramatically impact what features are highlighted:

Rotated and illuminated surface plot

Off-Label Use of the Surface Plot? 

Tseng notes that combining biomechanical analysis of the theoretical skulls and functional landscapes like the 3D surface plot is a novel approach to the study of convergent evolution, one that permits fossil species to be used in biomechanical simulations, and also provides comparative data about hypothesized form-function relationships. What did he find?  He explained it this way in an interview:

What I found, using models of theoretical skulls and those from actual species, was that increasingly specialized dogs and hyenas did evolve stronger and more efficient skulls, but those skulls are only optimal in a rather limited range of possible variations in form. This indicates there are other factors restricting skull shape diversity, even in lineages with highly directional evolution towards biomechanically-demanding lifestyles...although the range of theoretical skull shapes I generated included forms that resemble real carnivore skulls, the actual distribution of carnivoran species in this theoretical space is quite restricted. It shows how seemingly plausible skull shapes nevertheless do not exist in nature (at least among the carnivores that I studied).

In addition to 3D surface plots, Tseng used contour plots to help visualize his theoretical landscapes. In my next post, I'll show how to create and manipulate those types of graphs in Minitab. Meanwhile, please be sure to check out his paper for the full details on Tseng's research: 

Tseng ZJ (2013) Testing Adaptive Hypotheses of Convergence with Functional Landscapes: A Case Study of Bone-Cracking Hypercarnivores. PLoS ONE 8(5): e65305. doi:10.1371/journal.pone.0065305


Studying Old Dogs with New Statistical Tricks Part II: Contour Plots and Cracking Bones

$
0
0

A skull made for cracking some bones! Yesterday I wrote about how paleontologist Zhijie Jack Tseng used 3D surface plots created in Minitab Statistical Software to look at how the skulls of hyenas and some extinct dogs with similar dining habits fit into a spectrum of possible skull forms that had been created with 3D modelling techniques.

What's interesting about this from a data analysis perspective is how Tseng took tools commonly used in quality improvement and engineering and applied them to his research into evolutionary morphology.

We used Tseng's data to demonstrate how to create and explore 3D surface plots yesterday, so let's turn our attention to contour plots. 

How to Create a Contour Plot 

Like a surface plot, we can use a contour plot to look at the relationships between three variables on a single plot. We take two predictor variables (x and y) and use the contour plot to see how they influence a response variable (z).  

A contour plot is like a topographical map in which x-, y-, and z-values substitute for longitude, latitude, and elevation. Values for the x- and y-factors (predictors) are plotted on the x- and y-axes, while contour lines and colored bands represent the values for the z-factor (response). Contour lines connect points with the same response value.

Since skull deepening and widening are major evolutionary trends in bone-cracking dogs and hyaenas, Tseng used skull width-to-length and depth-to-length ratios as variables to examine optimized shapes for two functional properties: mechanical advantage (MA) and strain energy (SE). 

Here's how to use Minitab to create a contour plot like those in Tseng's paper

  1. Download and open the worksheet containing the data.
  2. Choose Graph > Contour Plot.
  3. In Z variable, enter SE (J). In Y variable, enter D:L. In X variable, enter W:L. 
  4. Click OK in the dialog box.

Minitab creates the following graph: 

Contour Plot of Skull Strain Energy

Now, that looks pretty cool...but notice how close the gray and light green bands in the center are?  It would be easier to distinguish them if we had clear dividing lines between the contours.  Let's add them. We'll recreate the graph, but this time we'll click on Data View in the dialog box, and check the option for Contour Lines:

adding contour lines to contour plot

Click OK > OK, and Minitab gives us this plot, which is much easier to scan: 

contour plot with contour lines

Refining and Customizing the Contour Plot

Now, suppose you've created this plot, as we did, with 9 contour levels for the response variable, but you really don't need that much detail?  You can double-click on the graph to bring up the Edit Area dialog box, from which you can adjust the number of levels from 2 through 11.  Here's what the graph looks like reduced to 5 contour levels: 

Contour plot with five levels

Alternatively, we can specify which contour values to display. And if your boss (or funding agency) doesn't like green or blue, it's very easy to change the contour plot's palette. You can also adjust the type of fill used in specific contours:

Contour plot with custom palette and shading

Whoa. 

Reading the Contour Plot 

As noted earlier, we read the contour plot as if it were a topographical map: the contours indicate the "steepness" of the response variable, so we can look for: 

  • X-Y "coordinates" that produce maximal or minimal responses in Z
  • Ridges" of high values or "valleys" of low values

It's easy to see from this demonstration why the contour plot is such a popular tool for optimizing processes: it drastically simplifies the task of identifying which values of two predictors lead to the desired values for a response, which would be a bit of a pain to do using just the raw data.

To see how Tseng used contour plots, check out his study: 

Tseng ZJ (2013) Testing Adaptive Hypotheses of Convergence with Functional Landscapes: A Case Study of Bone-Cracking Hypercarnivores. PLoS ONE 8(5): e65305. doi:10.1371/journal.pone.0065305

The Lottery, the Casino, or the Sportsbook: Simulating Each Bet in Minitab

$
0
0

MoneybagI previously started looking into which method of gambling was your best bet: a NFL bet, a number on a roulette wheel, or a scratch-off lottery ticket. After calculating the expect value for each one, I found out that the NFL bet and roulette bet were similar, as each had an expected value close to -$0.50 on a $10 bet. The scratch-off ticket was much worse, having an expected value of -$2.78.

But I want see how each of these games could play out in real life. After all, it is possible for people to come out ahead playing each game. So I planned to take 300 people, split them into 3 groups (one for each game), and have each group make a $10 bet once a day for a year.

After a failed attempt to find 300 friends, family members, and coworkers to agree to gamble $10 a week for a year, I realized I was going to have to simulate the gambling myself. Luckily Mintiab Statistical Software has a set of tools that made this very easy! So I’m going to show you exactly how I did. Then you, too, can start your own underground casino...uh, I mean, run an experiment to see how different types of bets play out in the long run.

We better just get to the simulation. If you want to follow along and don't already have it, download Minitab's free 30-day trial.

Simulating the NFL Bets

Let’s start with the football bet. We know there are two outcomes, either winning $9.09 or losing $10. So in a column called “Football,” I type “9.09” and “-10” into the first two rows. We can now take a random sample from this column because 50% of the time we'll win $9.09, and 50% of the time we'll lose $10. So let's have our 100 people make their bets! With 52 weeks in a year, and with 100 people making one bet a week, that’s a total of 5,200 total bets. To simulate that I went to Calc > Random Data > Sample From Columns and filled out the dialog as follows.

Simulate Football Bets

Finally, I needed a column for my 100 people! To do that, I went to Calc > Make Patterned Data > Simple Set of Numbers and filled out the dialog as follows:

100 People

So now I have a column called "Football Winnings" that has the outcome of my 5,200 football bets, and another column called "Person" that has the numbers 1 through 100 (each number representing a different person),each listed 52 times. Voila! It's as if we had 100 people making a football bet one day for a year!

Too bad there isn't actually a football game to bet on each day of the year.

Simulating the Roulette Bets

For the roulette bets I followed the same steps as the football bets. The only difference (besides having different column names) was that the "Roulette" column had more than two observations. The odds of winning are 1 out of 38, not 1 out of 2! To make this work out, I entered 350 in the first row, and -10 in the next 37. Now when we sample from this column, we'll win $350 1/38 of the time, and lose $10 37/38 of the time.

Simulating the Lottery

The lottery simulation became much more complicated. After some math, I found that if there were 1,440,000 tickets, there would be exactly:

  • 2 tickets that won $300,000
  • 4 tickets that won $30,000
  • 8 tickets that won $10,000
  • 480 tickets that won $1000
  • 960 tickets that won $500
  • And so on, until you got to 1,020,919 tickets that lost $10.

In order to have a column that accurately reflects the odds of winning each prize, I need a column with 299,990 listed twice (the amount you profit), $29,990 listed 4 times, $9,999 listed 8 times, all the way to -10 listed over a million times. In total the column will have 1,440,000 rows. I’m definitely not typing all that in!

To save myself from a lot of painful data entry, I once again turned to Calc > Make Patterned Data > Simple Set of Numbers. But this time I made a column for each prize. For example, to get the 1,020,919 tickets that lost $10 I filled out the dialog as follows to get a “-10” column.

-10

I did the same thing for each prize amount, and ended up with 10 columns (there are 12 different prize amounts, but I combined the top 3 prizes into a single column). Then I used Data > Stack > Columns to combine all the columns into a single column. But can Minitab support a single column with almost a million and a half rows? I’m about to find out.

Stack Columns

A column with 1,440,000 rows!

It worked! After stacking the columns, I was able to create a single “Lottery” column with 1,440,000 rows! Now I can simulate my lottery tickets just like I did with the previous two bets!

Now the hard part is behind us! We have all of our data in Minitab, so all we have to do is perform a data analysis on the results. I'm going to make one more post to show how our 300 people did. So be sure to check back tomorrow to see if anybody got lucky and won big!

Read Part I of this series

Read Part III of this series

Quality Improvement in Healthcare: Completing Projects with DMAIC

$
0
0

Franciscan HospitalThe DMAIC methodology for completing quality improvement projects divides project work into five phases: define, measure, analyze, improve, and control. It’s also probably the most well-known and most used project methodology for projects that focus on improving an existing process. (Many other methodologies exist, such as DMADV, which focuses on using quality improvement techniques to create a new product of process design.)

Franciscan Hospital for Children, a hospital in Brighton, Mass., that specializes in the care of children with special health care needs, recently completed a project using the DMAIC methodology to increase the operating room efficiency of dental surgeries. It’s a great example of successfully using DMAIC in healthcare. So how did they do it? Read on.

Improving the Capacity of Dental Operating Rooms

Recognizing the opportunity to grow a key area of service, the hospital’s quality improvement team chose to focus efforts on the dental division, where the dental surgeries were not occurring as efficiently as possible. Previous analysis and studies done to assess capability indicated that the facility was capable of completing 12 surgeries per day, but it currently had an average daily rate of only 8.7 surgeries. The hospital team’s goal was to meet a daily average of 12 surgeries.

As part of the ‘define’ phase of the DMAIC approach, the team involved staff representatives from the nursing, scheduling, registration, and anesthesiology departments. They developed process maps to help them  better understand current processes for scheduling, registration, and surgery preparation, and to get insight into the factors affecting each process. They were able to narrow down both internal and external contributors to cancellations and no-shows, as well as idle time that occurred due to process bottlenecks. The team then prioritized factors for further investigation—directing their attention to the analysis of variables they could control.

For example, the hospital team compiled data and created a Pareto chart to analyze the reasons for cancellations. The Pareto analysis helped them determine which reason occurred most frequently, and aided them in understanding how daily cancellations affected overall cycle times and scheduling.

Minitab Pareto chart

Individual Value Plots in Minitab helped the team view the distribution of actual procedure time and the time originally allotted for each procedure. They found that shorter procedures tended to exceed scheduled time, while longer procedures tended to finish earlier than scheduled. The graphs allowed the team to quickly view how much unused time occurred each day in each operating room.

Minitab Individual Value Plot

Team members followed up with further analysis (the "analyze" phase) to understand other factors that contributed to unused time in the operating rooms, and used histograms to analyze turnaround times for procedures, noting significant variation in the times. They realized the opportunity to reduce both the variation and the average turnaround to allow for more time to do procedures.

By analyzing the data and learning more about factors that negatively affect processes, the team was able to develop process changes, then test the effectiveness of improvements. They completed current state and future state Value Stream Maps in Quality Companion to identify opportunities for improving the lead time and then began executing the new, leaner processes.

Value Stream Mapping in Quality Companion

Results

Within two weeks of starting the improvement phase, average surgeries per day jumped from 8.7 to 9.9, and then to 11.2 during the control phase. At the same time, day-to-day utilization rates stabilized. The project also helped the team establish performance metrics that will be used to continually improve operating room capacity and utilization rates. By regularly plotting process data with control charts, staff can easily monitor for any unusual variation in the number of surgeries per day (the "control' phase").

Interested in learning more about quality improvement in healthcare? Check out these posts:

Lean Six Sigma in Healthcare: Improving Patient Satisfaction

How to Use Value Stream Maps in Healthcare

 G and T Charts, and Feedback from the National Association of Healthcare Quality Annual Conference

Seven Basic Quality Tools to Keep in Your Back Pocket

$
0
0

DenimHere are seven quality improvement tools I see in action again and again. Most of these quality tools have been around for a while, but that certainly doesn’t take away any of their worth!

The best part about these tools is that they are very simple to use and work with quickly in Minitab Statistical Software or Quality Companion, but of course you can use other methods, or even pen and paper.

1. Fishbone Diagram

Fishbones, or cause-and-effect diagrams, help you brainstorm potential causes of a problem and see relationships among potential causes. The fishbone below identifies the potential causes of delayed lab results:

Fishbone in Quality Companion

On a fishbone diagram, the central problem, or effect, is on the far right. Affinities, which are categories of causes, branch from the spine of the central effect. The brainstormed causes branch from the affinities.

2. Control Chart

Common Components of a Control chart

Control charts are used to monitor the stability of processes, and can turn time-ordered data for a particular characteristic—such as product weight or hold time at a call center—into a picture that is easy to understand. These charts indicate when there are points out of control or unusual shifts in a process.

(My colleague has gone into further detail about the different types of control charts in another post.)

3. Histogram

You can use a histogram to evaluate the shape and central tendency of your data, and to assess whether or not your data follow a specific distribution such as the normal distribution.

Bars represent the number of observations falling within consecutive intervals. Because each bar represents many observations, a histogram is most useful when you have a large amount of data.

Minitab Histogram

4. Process Map

A process map, sometimes called a flow chart, can be used to help you model your process and understand and communicate all activities in the process, the relationships between inputs and outputs in the process, and key decision points.

Process Map in Quality Companion

Quality Companion makes it easy to construct high-level or detailed flow charts, and there’s also functionality to assign variables to each shape and then share them with other tools you’re using in Companion.

5. Pareto Chart

Pareto charts can help you prioritize quality problems and separate the “vital few” problems from the “trivial many” by plotting the frequencies and corresponding percentages of a categorical variable, which shows you where to focus your efforts and resources.

Minitab Pareto Chart

For a quick and fun example, download the 30-day trial version of Minitab (if you don’t have it already), and follow along with Pareto Power! or Explaining Quality Statistics So Your Boss Will Understand: Pareto Charts.

6. Run Chart

You can use a run chart to display how your process data changes over time, which can reveal evidence of special cause variation that creates recognizable patterns.

Minitab's run chart plots individual observations in the order they were collected, and draws a horizontal reference line at the median. Minitab also performs two tests that provide information on non-random variation due to trends, oscillation, mixtures, and clustering -- patterns that suggest the variation observed is due to special causes.

Run Chart Example

7. Scatter Plot

You can use a scatter plot to illustrate the relationship between two variables by plotting one against the other. Scatterplots are also useful for plotting a variable over time.

Minitab Scatterplot

What quality tools do you keep in your back pocket?

Using Design of Experiments to Minimize Noise Effects

$
0
0

"Variability is the enemy"All processes are affected by various sources of variations over time. Products which are designed based on optimal settings, will, in reality, tend to drift away from their ideal settings during the manufacturing process.

Environmental fluctuations and process variability often cause major quality problems. Focusing only on costs and performances is not enough. Sensitivity to deterioration and process imperfections is an important issue. It is often not possible to completely eliminate variations due to uncontrollable factors (such as temperature changes, contamination, humidity, dust etc…).

For example, the productssold by your company might go on to be used in many different environments across the world, or in many different (and unexpected) ways, and your process (even when it has been very carefully designed and fine-tuned) will tend to vary over time.

"Variability is the enemy."

The most efficient and cost effective solution to that issue is to minimize the impact of these variations on your product's performance.

Even though variations in the inputs will continue to occur, the amount of variability that will still be “transmitted” to the final output may be reduced. But the major sources of variations need to be identified in order to study the way in which this variability “propagates” into the system. The ultimate objective is to reduce the amount of variability (from the inputs) that affects your final system.

Noise en control effects on the final output

It is possible to better assess the noise (uncontrollable variations from the inputs) factor effects using an ANOVA, a Design of Experiments (DOE), or a regression analysis. Some parameters that are easily controllable (control factors) in your system may interact with these noise effects. Interacting, in this instance, means that a noise factor effect may be modified by a controllable factor. If that is the case, we can use this noise*control interaction to minimize the noise effects.

Two Approaches to Understanding and Reducing Variability

There are actually two ways in which we can reduce the amount of variability that affects your process:

  1. Use non-linear effects: Response surface DOEs may be used to study curvatures and quadratic effects. In the graph below, you can see that factor B has a quadratic effect on the Y response.

    Non linear effect on the Y output
    The slope of the curve is much steeper for low values of B (B-), with a shallow slope for larger values of B (B+). The shallow part of the curve is the so-called “sweet spot.” Although the variations of B at the – or at the + level are strictly equivalent, the amount of variability that is propagated to Y is much smaller at B+ (the sweet spot). Setting B at its + level can make the process more robust to variations in the B variable.

     
  2. Use Interaction effects: The next graph shows the interaction of a noise factor (B) with an easily controllable factor (C).

    Noise by Control interaction

    The slopes of the two lines represent the linear effect of the noise factor (B), and the difference between the two lines represents the controllable factor effect (C). Please note that the B (Noise) effect is much smaller when C (the controllable factor) is set at its – level (C-). Therefore one can use the C factor to minimize the B (noise) effect, thereby making the process more robust to the fluctuations of B.
A Manufacturing Example

The objective in this example is to improve the robustness of an automotive part (a recliner) to load changes.

The noise factor is the load. Two levels have been tested: no load (Noise -) or large load (Noise +)). There also are three easily controllable factors: Type of grease, Type of Bearing, and Spring Force), each with two levels. The design is a full 23 DOE which has been replicated twice (8*2=16 runs for every combination of the noise factor level).

The response is the acceleration signal. The runs have been performed with no load (Noise at level -) and with a large load (Noise at level +). The Noise effect is the difference between those two runs (Noise Effect = (“Noise +”) – (“Noise –“)) .

The mean effect of the noise factor is 1.9275, and the goal is to minimize this noise effect. It's also important to minimize the amount of acceleration.

The analysis of the experimental design has been performed using Minitab Statistical Software. Two responses have been studied : Acceleration Signal, and Noise (Load) effect, both of which are important to optimizing the system.

The Design of experiments array is pictured below. For each line of the Minitab worksheet, a noise effect has been calculated (Effect = (“Noise +”) – (“Noise –“)). An acceleration signal Mean has also been computed.

The Design of Experiments array

The following Pareto chart shows the factor effects on the acceleration signal mean. Bearing, Grease and Spring Force are all significant, two interactions (AB and AC) are also significant (above the red significance threshold).

Pareto of the effects on the mean

The Cube plot shows that a Type -1 bearing combined with a Type 1 grease lead to a low acceleration signal:

Cube plots of effects on mean

The interaction plot illustrates the effect of the Bearing * Grease interaction on the final output Mean response. When Bearing is set at its –1 level, Grease has almost no effect on the acceleration signal.

Interaction effects on the mean response

Impact of Controllable Factors on Noise Effects

The next Pareto chart is used to study the controllable factor effects on the Noise effects, when noise effect represents the final output response. A, B and the AB interaction are all significant (above the red significance threshold).

Pareto of the effects on the noise output

The interaction plot illustrates the Bearing*Grease interaction effect on the noise effect response : a Type -1 Bearing leads to much smaller noise effects, and when Bearing is set at its –1 level, Grease has almost no impact on the Noise effect.

Control factors interaction on the noise effect

Conclusion

This DOE analysis shows that selecting a Type -1 Bearing can substantially reduce the acceleration signal and the noise effect. Therefore the system is now much more robust to loading changes. This was the final objective. I decided to study the effect of the controllable factors on the noise effects directly rather than use more complex responses (such as Taguchi’s Signal To Noise ratio), as I thought it would be easier to understand and more explicit.

I hope this example illustrates how Design of Experiments can be a powerful tool to make processes and products less sensitive to variations in their environment.

 

Coffee or Tea? Analyzing Categorical Data with Minitab

$
0
0

Coffee or Tea? Here at Minitab we have a quite a few coffee drinkers.  From personal observation, it seemed as if people who are more outgoing are the ones doing most of the coffee drinking, while people who are less outgoing seem to opt for tea.  I’d noticed this over a period of time, and eventually decided to investigate.

To test out my hypothesis, I decided to pester some of my coworkers by asking them to participate in my beverage choice survey.  Given that the data I collected is categorical rather than continuous, this also seemed like a great way to showcase some of Minitab’s tools for analyzing categorical data.

I surveyed 50 individuals, asking each just two questions:  1) Do you prefer coffee or tea, and 2) Do you consider yourself an introvert or an extrovert?  The raw data was entered in a Minitab worksheet as two separate columns.  Just for fun, I also generated some pie charts to help me visualize the data.

Beverage Choice DataPie Chart of Beverage Choice

The next thing I did was to summarize the data using Descriptive Statistics (Stat > Tables > Descriptive Statistics):

Descriptive Statistics

Already, it looks like I may be on to something!  We can see from the summarized data that extroverts appear to prefer coffee.  But how can we assess if a relationship exists between beverage choice and personality type?  Is there a statistically significant relationship here?  To answer this question, we can use a Chi-Square test. 

What Is a Chi-Square Test?

A Chi-Square test of association does just what the name implies: it tests to see if there is an association between categorical variables.  The null hypothesis for the test is that no association exists between the variables.  Since my data is in raw format, I used the Cross Tabulation and Chi-Square option in Minitab.  The results of the test are shown below:

Cross Tabulation & Chi-Square

Minitab displays two chi-square statistics: The Pearson Chi-Square statistic is 9.212, and its corresponding p-value is quite low at 0.002.  The other Chi-Square statistic we have is the Likelihood-Ratio Chi-Square which has a value of 9.162 and also has a low p-value of 0.002. 

Given this information, we reject the null hypothesis of no association and conclude that there is in fact a relationship between personality and beverage choice. 

Odds Ratio

What else can we learn from this data?  We can easily calculate the odds ratio for this 2x2 table.  An odds ratio compares the odds of two events, where the odds of an event equals the probability the event occurs divided by the probability that it does not occur.  For our example, the ‘event’ is preferring coffee.  For the data in the table above, the calculation is (26*11)/(6*7) = 6.8.  An odds ratio of 6.8 tells us that Extroverts are more than six times as likely to choose coffee over tea compared with introverts. 

Logistic Regression

Another way to look at this data is to use a logistic regression.  A logistic regression models a relationship between predictor variables and a categorical response variable.  In Minitab, you can choose from three types of logistic regression (binary, nominal or ordinal), depending on the nature of your categorical response variable.  For our example, we will use binary logistic regression because the response variable has two levels (the response being the beverage choice of coffee or tea).

The binary logistic regression option in Minitab is available under Stat > Regression > Binary Logistic Regression.  Because my only predictor (Personality) is categorical, I must enter it in the Model field as well as the Factor field in the dialog box:

BLR Dialog

To understand the output, we need to know the reference event for the response.  Minitab needs to designate one of the response values (Coffee or Tea) as the reference event.  The default setting for text factors is that the reference event is the last in alphabetical order (so by default it would be Tea).  Since I’m really interested in knowing who prefers coffee, I can change the reference event to Coffee by clicking the Options button in the binary logistic regression dialog box and making the change in the Event field:

BLR Dialog 2

In Minitab, we can also specify the factor level reference (Introvert or Extrovert).  The estimated coefficients are then interpreted relative to this reference level.  For text factors, the reference level is the level that is first in alphabetical order by default (so Extrovert would be the default).  I want the reference level to be Introvert instead so I also made that change in the above dialog box.

Clicking OK in each dialog box gave me the results below:

BLR Output

The negative coefficient for the Constant (-0.451985) is the effect on the beverage choice for introverts, and they are less likely to choose coffee than extroverts.  The positive coefficient for Extrovert indicates that extroverts are more likely than introverts to choose coffee over tea. 

The p-value for Extrovert (0.004) indicates that Personality is a significant predictor of Beverage Choice.  Additionally, since we have only one predictor, the odds ratio (6.81) is consistent with the odds ratio that was estimated from the 2x2 table. 

As a final step, I used one of the count data macros from Minitab’s macros library to generate an ROC curve, which summarizes the predictive power of this model:

ROC Curve

For the ROC curve, the better the predictive power, the higher the curve.  An area under the curve of 1 represents a perfect test, and an area of 0.5 (a straight diagonal line from the lower left corner to the upper right corner) represents a pretty worthless model.  For this model, the area under the curve = 0.72, so the predictive power of the model is fair. 

I had fun confirming my hypothesis with data, and I hope this information is helpful in identifying some of the tools that Minitab offers for analyzing categorical data!

My Favorite Quality Tool: Process Mapping

$
0
0

Process Map - Quality CompanionWe all seem to have our favorite statistical or quality improvement tool. Jim Frost wrote a tribute to regression analysis. Dawn Keller seems to enjoy control charts. Eston Martz discusses reliability analysis and the Weibull distribution pretty regularly. So, I started thinking … what’s my favorite quality tool?

I’ve always been drawn to process mapping, or what's sometimes referred to as ‘flow charting.’ Even before I started my work with Minitab and learning about quality improvement techniques, I’ve considered myself somewhat of a visual learner. I notice myself explaining things to others by drawing pictures—and when it comes to learning new processes on the job, I definitely relate better to how -to documentation that features pictures of the process steps over step-by-step directions in a text and list format.

While process maps aren’t the most complex tool, they are a great place to start trying to improve a process. By visually depicting the sequence of events in your process, you’re better able to understand the pain points and are more apt to identify process steps with waste. Having a map drawn for your process also makes it easy to communicate about the process with others and easily see relationships between inputs and outputs and where key decision points lie.

Here are a few tips for creating a good process map:

Process Mapping 1011. Make process mapping a team effort.

http://cdn.morguefile.com/imageData/public/files/t/taliesin/preview/fldr_2008_11_02/file0001284293842.jpg

Call me a process nerd, but there’s something exciting and fun about assembling your improvement team and sitting in a room to flesh out process steps and to eventually map those steps visually. I’ve found it to be a good bonding experience for the team, as well as a chance to hear everyone’s perspective of things that are working well, or not so well. Don’t forget to include people who have various jobs related to your process so that they can help point out things about your process that you might have missed otherwise. As a team, schedule an initial meeting to determine basics about your process, such as where the process starts and where it ends, but don’t get too comfortable in that meeting …

2. Always walk the process to ensure the process map is accurate.

http://cdn.morguefile.com/imageData/public/files/i/imelenchon/preview/fldr_2009_06_06/file6461244338923.jpg

Don’t get too comfortable because you’ll want to walk the process to ensure any initial process map draft is on point. Experiencing the process will help you see things you wouldn’t have seen before!

If you follow the Plan-Do-Check-Act methodology, and even if you don’t, Mark Rosenthal wrote a great post about “walking the gemba,” and the importance of not just walking the process, but actually observing and watching the activities taking place (interactions between employees, interaction with customers, etc.).

3. Create process maps at multiple times over the course of your project.

When is the best time to create a process map? Pre-project, mid-project, end of project? I think the answer is all of the above. Drawing a process map pre-project can help you identify potential projects by isolating areas of the process that need improvement. Process mapping can also be a good first step in scoping your project and helping to define the beginning and end of the process segment that’s the focus of your project.

Creating a process map mid-project can also be helpful for teams to brainstorm new ideas and recap what’s been learned initially, as well as a good opportunity to reconvene and start to create a ‘future state’ process map. Updating your process map at the end of your project to include any process changes or improvements is also good practice. If you have the new process well-documented, it may help it to become more quickly adopted.

So how can you create a process map? The possibilities really are endless! Use a white board, pen and paper, or a tool like Quality Companion. Give Quality Companion a try free for 30 days, and use the software to construct a high-level or detailed process map and then save it among all the other tools and documents related to your project in one file.

One of my favorite features of using Quality Companion for process mapping is the pan window. For a more complex process map, you can use the pan window to view the areas that are outside the visible workspace. It’s helpful for quickly navigating around your process map and zooming in on individual steps or sections of your process.

In Companion, choose View > Pan Window:

http://www.minitab.com/en-US/support/help/qeystone/en/run-projects/maps/resources/pan_window.gif

The red box identifies the area that is visible in your Companion workspace.

What other tips have helped you in creating a worthwhile process map?


Statistical Fun … at the Grocery Store?

$
0
0

Grocery StoreGrocery shopping. For some, it's the most dreaded household activity. For others, it's fun, or perhaps just a “necessary evil.”

Personally, I enjoy it! My co-worker, Ginger, a content manager here at Minitab, opened my eyes to something that made me love grocery shopping even more: she shared the data behind her family’s shopping trips. Being something of a data nerd, I really geeked out over the ability to analyze spending habits at the grocery store!

So how did she collect her data? What I find especially interesting is that Ginger didn’t have to save her receipts or manually transfer any information from her receipts onto a spreadsheet. As a loyal Wegmans grocery store shopper, Ginger was able to access over a year’s worth of her receipts just by signing up for a Wegmans.com account and using her ‘shoppers club’ card. The data she had access to includes the date, time of day, and total spent for each trip, as well as each item purchased, the grocery store department the item came from (i.e., dairy, produce, frozen foods, etc.), and if a discount was applied. As long as she used her card for purchases, it was tracked and accessible via her Wegmans.com account. Cool stuff!

Ginger created a Minitab worksheet with her grocery receipt data from Wegmans spanning from October 2011 – January 2013, and shared it with Michelle and myself to see what kinds of Minitab analysis we could do and what we might be able to uncover about her shopping habits.

Using Time Series Plots to See Trends

Time series plots are great for evaluating patterns and behavior in data over time, so a time series plot was a natural first step in helping us look for any initial trends in Ginger’s shopping behavior. Here’s how her Minitab worksheet looked:

Minitab Worksheet

And here’s a time series plot that shows her spending over time:

Time Series Plot in Minitab

To create this time series plot in Minitab, we navigated to Graph > Time Series Plot. It was easy to see that Ginger’s spending appears random over time, filled with several higher dollar orders (likely her weekly bulk trip to stock up) and several smaller orders (things forgotten or extras needed throughout the week). There doesn’t appear to be a trend or pattern. Almost all of her spending remained under $200 per trip, which is pretty good considering that many of her trips looked to be weekly bulk orders to feed her family of four. There were also very few outlier points with extremely high spending away from her consistent behavior to spend between $100 and $150 a 3-4 times per month.

However, you’ll notice that the graph above isn’t the simplest to read. To make it easier to zone-in on monthly spending habits, we used the graph paneling feature in Minitab to divide the graph into more manageable pieces:

Minitab TIme Series Plot - Paneled

The paneled graph makes it even easier to see that Ginger’s spending appears to be random, but consistently random! For more on paneling, check out this tutorial: Exploring Your Data with Graph Paneling.

Visualizing Spending Data by Day of the Week

To chart grocery spending by day of the week, we created a simple boxplot in Minitab (Graph > Boxplot):

Minitab Box Plot

It’s pretty easy to see that Ginger’s higher-spending trips took place on Saturdays, Sundays, Mondays, and Tuesday, with the greatest spread of spending (high, low, and in-between) occurring on Tuesdays. Wednesday appeared to be a low-spending day, with what looks to be quick trips to pick up just a few items.

How about the number of trips occurring each day of the week? To see this, we created a simple bar chart in Minitab (Graph > Bar Chart):

Minitab Bar Chart

The highest number of Ginger’s trips to Wegmans occurred on Sunday (35) and Saturday (26), which isn’t really a surprise considering that many people do the majority of their grocery shopping on the weekends when they have time off from work. It’s also neat to see that many of her trips occurring on Wednesday and Thursday were likely smaller dollar trips (according to our box plot from earlier in the post). I can definitely relate to those pesky mid-week trips to get items forgotten earlier in the week!

Visualizing Spending Data by Department

And finally, what grocery store department does Ginger purchase the most items from? To figure this out, we created a Pareto chart in Minitab (Stat > Quality Tools > Pareto Chart):

Minitab Pareto Chart

You can see that the highest number of items purchased is classified under OTHER, which we found to be a catch-all for items that don’t fit neatly into any of the other categories. In looking through the raw data with the item descriptions classified as OTHER, I found everything from personal care items like toothbrushes, to paper plates, and other specialty food items. The GROCERY category is another ambiguous category, but it seems as if this category is largely made up of items like canned and convenience foods (think apple sauces, cereal, crackers, etc.). The rest of the categories (dairy, produce, beverages) seem pretty self-explanatory.

The Pareto analysis is helpful because it can bring perspective to the types of foods being bought. Healthier items will likely be in the produce and dairy categories, so it’s good to see that these categories have high counts and percents in the Pareto above.

Grocery stores love data, too.

It’s certainly no surprise that grocery stores love to track consumer buying behaviors through store discount cards. This helps stores to better target consumers and offer them promotions they are more likely to take advantage of. But it’s also great that grocery stores like Wegmans are sharing the wealth and giving consumers the ability to easily access their own spending data and draw their own conclusions!  

Do you analyze your spending at the grocery store? If so, how do you do it?

Top photo courtesy of Ginger MacRae. Yes, those are her acutal groceries!

The Gentleman Tasting Coffee: A Variation on Fisher’s Famous Experiment

$
0
0

by Matthew Barsalou, guest blogger

coffeeIn the 1935 book The Design of Experiments, Ronald A. Fisher used the example of a lady tasting tea to demonstrate basic principles of statistical experiments. In Fisher’s example, a lady made the claim that she could taste whether milk or tea was poured first into her cup, so Fisher did what any good statistician would do—he performed an experiment.

The lady in question was given eight random combinations of cups of tea with either the tea poured first or the milk poured first. She was required to divide the cups into two groups based on whether the milk or tea was poured in first. Fisher’s presentation of the experiment was not about the tasting of tea; rather, it was a method to explain the proper use of statistical methods.

Understanding how to properly perform a statistical experiment is critical, whether you're using a data analysis tool such as Minitab Statistical Software or performing the calculations by hand.

The Experiment

A poorly performed experiment can do worse than just provide bad data; it could lead to misleading statistical results and incorrect conclusions. A variation on Fisher’s experiment could be used for illustrating how to properly perform a statistical experiment. Statistical experiments require more than just an understanding of statistics. An experimenter must also know how to plan and carry out an experiment.

A possible variation on Fisher’s original experiment could be performed using a man tasting coffee made with or without the addition of sugar. The objective is not actually to determine if the hypothetical test subject could indeed determine if there is sugar in the coffee, but to present the statistical experiment in a way that is both practical and easy to understand. Having decided half of the cups of coffee would be prepared with sugar and half would be prepared without sugar, the next step is to determine the required sample size. The formula for sample size when using a proportion is

sample size when using proportions formula

In this equation the n is the sample size, p is the probability something will occur and q is the probability it will not occur.  Z is the Z score for the selected confidence level and E is the margin of error. We use 0.50 for both p and q because there will be a 50/50 chance of randomly selecting the correct cup. The Z score is based on the alpha (α) level we select for the confidence level; in this case we choose an alpha of 0.05, so that there is a 5% chance of failing to reject the null hypothesis when it should actually be rejected. We will use 15% for E. This means the sample size would be:

sample size calculation

We can’t perform 0.68 tests, so we round up to the next even whole number, which would mean 44 trials. We would need 22 cups of coffee with sugar and 22 cups of coffee without sugar.  That is a lot of coffee so the cup size will be 10 ml each. There is a risk that different pots of coffee will not be the same as each other due to differences such as the amount of coffee grain used or the cooling of the coffee over time. To counter this, the experimenter would brew one large pot of coffee and then separate it into two containers; one container would receive the sugar.

A table is then created to plan the experiment and record the results. The first 22 samples would contain sugar and the next 22 would not. Simply providing the test subject with the cups in the order they are listed would risk the subject realizing the sugar is in the first half so randomization will be required to ensure the test subject is unaware of which cups contain sugar.  Fisher in The Design of Experiments referred to randomization as an “essential safeguard.” A random sequence generator can used to assign the run order to the samples.

The accuracy of the results could be increased by using blinding. The experimenter may subconsciously give the test subject signals that could indicate the actual condition of the coffee. This could be avoided by having the cups of coffee delivered by a second person who is unaware of the status of the cups. The use of blinding adds an additional layer of protection to the experiment.

The Analysis (by Hand)

Suppose the test subject correctly identified 38 out of 44 samples, which results in a proportion of 0.86. This could have been the result of random chance and not actually correctly identifying the samples so a one sample proportion test could be used to evaluate the results. A one sample proportion test has several requirements that must be met:

  1. The sample size times the probability of an occurrence must be greater than or equal to 5 so:  np ≥5. We have 44 samples and the chance of a random occurrence is 0.5 so 44 x 0.5 = 22.
     
  2. The sample size times the probability something will not occur must be greater than or equal to 5 so:  nq ≥ 5.  We have 44 samples and the chance of an occurrence not occurring is 0.5 so 44 x 0.5 = 22.
     
  3. The sample size must be large; generally, there should be 30 or more samples.

All requirements have been met so we can use the one sample hypothesis test to analyze the results. The test statistic is:

Z test statistic

 

 

The P represents the actual proportion and P0 represents the hypothesized proportion of the results if they had been random.

We need a null hypothesis and an alternative hypothesis to valuate. The null hypothesis states that nothing happened so P = P0. The alternative could be the two values are not equal; however, this could lead to rejecting the null hypothesis if the gentlemen tasting the coffee guessed incorrectly more often than should have happened through chance alone.  So we would use P > P0, which means we are using a one-tailed upper-tail hypothesis test. The resulting hypothesis test would be:

Null Hypothesis (H0): P = P0

Alternative Hypothesis (Ha): P > P0

We want a 95% confidence level so we check a Z score table and determi ne the proper Z score to use is 1.96. The null hypothesis would be rejected if the calculated Z value is higher than 1.96. The formula is:

formula

The resulting Z score is greater than 1.96 so we reject the null hypothesis. The rejection region for this test is the red area of the distribution depicted in figure 1. Had the resulting Z score been less than 1.96, we would have failed to reject the null hypothesis when using an α of 0.05.

rejection region

The Analysis (Using Statistical Software)

We can also perform this analysis using statistical software. In Minitab, select Stat > Basic Statistics > 1 Proporortion... and fill out the dialog box as shown below:

1 Proportion Test

Then click on the "Options" button to select "greater than" as the alternative hypothesis, and check the box that tells the software to use the normal distribution in its calculations:

1 Proportion Test options

Minitab gives the following output:

1 Proportion Test output

The z-value of 4.82 differs slightly from our hand-calculated value since Minitab used more decimals than we did, but the practical result is the same: the z-value is greater that 1.96, so we reject the null hypothesis. Minitab also gives us a p-value, which in this case is 0.  And as a wise statistician once said, "If the P-value's low, the null must go."

It is important to note that rejecting the null hypothesis does not automatically mean we accept the alternative hypothesis. Accepting the alternative hypothesis is a strong conclusion; we can only conclude there is insufficient evidence to reject it when compared against the null hypothesis and the null hypothesis only used as a comparison with the alternative hypothesis. Fisher himself, in The Design of Experiments, tells us “the null hypothesis is never proved or established, but is possibly disproved, in the course of experimentation.”

Fisher’s Results

As for the original experiment, Fisher’s son-in-law the statistician George E.P. Box informs us in the Journal of the American Statistical Association the lady in question was Dr. Muriel Bristol and her future husband reported she got almost all choices correct. In The Lady Tasting Tea David Salsburg also confirms the lady in question could indeed taste the difference; he was so informed by Professor Hugh Smith, who was present while the lady tasted her tea.

Fisher never actually reported the results; however, what mattered in Fisher’s tale is not whether or not somebody could taste a difference in a drink, but using the proper methodology when performing a statistical experiment.

 

About the Guest Blogger: 
Matthew Barsalou has been the quality manager at an automotive supplier in Germany since 2011, and previously worked as a contract quality engineer at Ford in Germany and Belgium. He is completing a master’s degree in industrial engineering at the Wilhelm Büchner Hochschule in Darmstadt, Germany, and is also working on a manuscript for a practical introductory book on statistics.
  

Would you like to publish a guest post on the Minitab Blog? Contact publicrelations@minitab.com

 

How Lean Six Sigma Students at Rose-Hulman Reduced Food Waste

$
0
0

CafeteriaTo promote ethical and moral responsibility in shaping its graduates, Rose-Hulman Institute of Technology created a sustainability initiative to reduce its own environmental footprint.

As part of that team's efforts, Six Sigma students at Rose-Hulman conducted a project to reduce food waste at the campus dining center. We got the opportunity to learn more about the project by talking with Dr. Diane Evans, a Six Sigma black belt and associate professor of mathematics at Rose-Hulman who led the students’ efforts, and Neel Iyer, a mechanical engineering student who was also on the project team.

Calculating Average Food Waste per Meal

According to a July 2012 article in Food Policy, U.S. food waste on the consumer level translated into almost 273 pounds per person in 2008. Evans’ students converted this number into pounds per day, and to determine the amount of waste per meal, they divided the figure by 2.5 meals per day (they did not count breakfast as a full meal because it typically does not see as much waste as lunch or dinner). The students ended up calculating an average food waste amount of 4.78 ounces per meal.

Using this number as a standard, the class set out to reduce the edible food waste per student by one ounce per meal during the lunch period. With this goal established, the class began by learning more about the current dining center processes and food waste at Rose-Hulman. “Our aim with this project was to reduce food waste using standardized quantitative process improvement techniques,” says Iyer. “Lean Six Sigma project tools make it easy to share the hard savings and prove results statistically, while also giving others a framework to replicate what we have done.”

Using Lean Six Sigma Tools in the Cafeteria

The students used the define, measure, analyze, improve, and control (DMAIC) methodology to manage and complete the project. As part of the define phase, students developed process maps using Quality Companion. The process maps helped them understand the current flow of students through the dining center, as well as where potential improvements could be made. In addition, they created a ‘Critical To Quality’ or CT Tree to quantify the students’ expectations for their dining experience and to visually connect the students’ needs to the goals of the project. This tool allowed them to verify that sustainability issues were a key concern to students, who wanted their school’s dining room to be environmentally friendly.

Quality Companion Process Map

With the process defined and the key causes outlined, the project entered the “measure” phase. The students collected baseline food waste data in order to establish the current capability of the process. They conducted a food audit to form their data set, during which class members stationed themselves at the food disposal area of the dining center. After students finished eating, class members collected their trays and scraped and dumped uneaten food and liquid into a bucket. Then the weight of the food waste was recorded. Using control charts, the students determined that the lunch-time waste process was “in control,” and that there were no unusual points or outliers.

The class chose to measure the capability of their process against the maximum national average waste per meal calculated earlier (4.78 ounces). They ran a capability study in Minitab (Stat > Quality Tools > Capability Analysis), and viewed all aspects of the analysis on one chart with the Capability SixpackTM. The study confirmed that Rose-Hulman had above-average food waste per person during lunch:

Minitab Capability Six Pack

For each process input from the group’s current-state process map, they constructed a C&E Matrix, with outputs based on those already listed in the CT Tree. The C&E Matrix helped the students to determine likely relationships between process inputs and outputs, and conducting an FMEA gave them another tool to identify and prioritize the severity of potential causes of waste.

Now the project entered the “improve” phase. The students formed a list of recommended actions based on the variables they could control and the short time frame they had to complete the project. These actions focused on educating students about food waste using posters, demonstrations, and seminars at the dining center during lunch hours. They also suggested that dining room staff provide students with smaller serving utensils for condiments, pre-dish more foods, and limit how many glasses and bowls of food or drink students could take per tray.

Finding a ‘Statistically Significant’ Difference in Waste Amounts

After the awareness campaign, the class performed a second food waste audit to determine the post-improvement process capability. They were able to show that the process was still capable with respect to the national average, and after providing students with food waste education, they found the process capability had improved over the capability analysis conducted before the education intervention.

The students used box plots (Graph > Boxplot) to compare food waste amounts before and after the educational campaign:

Minitab Box Plot

Further analysis of food waste data collected before and after the campaign revealed a statistically significant difference in waste amounts. The class’s data found an average reduction of 2.66 ounces of waste per person/meal (or 0.166 pounds per person/meal) after the campaign. Because the dining center typically serves about 875 students per day during lunch, the class estimated that the center could see a waste reduction of approximately 2,327.5 ounces, or 145.4 pounds during a single lunch period. Over the 50 lunch periods in a typical quarter at Rose-Hulman, a total of 7,270 pounds of food waste could be saved. And since food waste costs the dining center$1.60 per pound ($0.10 per ounce) on average, the class calculated a savings of $471.20 during just the two days they held the food waste campaign and collected data. If the campaign were run over an entire quarter, they estimated total savings of $11,781!

Although the improvement efforts were short-term, both Evans and her class were proud to pass on their findings to Rose-Hulman’s administrators. “The administration is proud as well, and they are showcasing the results,” says Evans. “They see the value, and they’re encouraging follow-up projects from the Six Sigma students.”

Interested in learning more from Dr. Evans?

If you’re planning on attending the 2013 Joint Statistical Meetings in Montréal August 3-8, Dr. Evans will present “Reducing Food Waste Through Six Sigma” on Wednesday, August 7 at 8:30 a.m. Check out the details at: http://ow.ly/m7uXK.

Also, Cory Heid, a student from Siena Heights University who was a recent guest blogger, will try to answer the age-old question: “How many licks to the Tootsie Roll center of a Tootsie Pop?” in his presentation at JSM on August 7 at 2:00 p.m. Check out the details at: http://ow.ly/m7v29.

Spicy Statistics and Attribute Agreement Analysis

$
0
0

Chili PeppersMy husband, Sean, and I were recently at my parent’s house for a picnic dinner. As a lover of hot sauce (I’m talking extremely hot, hot, hot, HOT sauce!), my stepdad always has a plethora of bottles around to try. While I do enjoy spicy foods from time to time, I’ve learned not to touch his hot sauce selections. His favorites are much too spicy for my taste!

Unfortunately, Sean learned the hard way. He used Habanero hot sauce on his hot sausage sandwich – talk about double the heat! I saw him sinking in his seat, eyes watering … a few hoarse coughs …

Yikes!  Anyway, Sean is alive and well after suffering for a few uncomfortable minutes. His recent hot sauce hardship got me thinking more what makes hot sauce “hot” and how the heat is measured.

Visualizing the Relative Spiciness of Hot Peppers

The Scoville Heat Scale is a measure of the hotness of a chili pepper, the main ingredient in hot sauce. The scale is actually a measure of the concentration of the chemical compound called capsaicin, which creates that “my-mouth-is-on-fire” feeling. Different types of chili peppers contain various amounts of capsaicin, and the Scoville scale provides us with a measure of the heat of a chili pepper depending on the level of capsaicin it contains.

The heat values are measured on a scale of 0, which would be a sweet bell pepper with no spiciness, to upwards of well over a million Scoville heat units, which are chili peppers with the highest heat ratings. Check out this bar chart (In Minitab, navigate to Graph > Bar Chart) with a few of the hottest recorded chili peppers (based on the chart in this article):

Minitab Bar Chart

Keep in mind the variability of ratings, which can change based on different species of chilies, and variable growing conditions. The chart above is just an interpretation for the sake of comparing the different kinds of chilies out there and their approximate heat levels.

Do Your Ratings of Different Hot Sauces Match Mine?

For a little bit of fun, I wanted to see whether Sean and I rate the same hot sauces based on their “heat” levels consistently. That way, at least from my perspective, I can tell if he’s just a big baby who can’t take the heat, or if I’m the one with the spicy intolerance. But perhaps, we’ll rate the hot sauces the same? Let’s just find out.

We picked up a sampler of 10 different hot sauces to test. We each rated the 10 different sauces on a 4-point scale: 1  = mild, 2 = hot, 3 = very hot, 4 = uncomfortably hot, and recorded our data into a Minitab Worksheet:

Minitab Worksheet

(You can download the dataset and follow along if you’d like.)

Performing an Attribute Agreement Analysis

What we want to do in this case is evaluate the ordinal measurement “rating” system for the hot sauce samples by performing an attribute agreement analysis in Minitab.

This type of analysis can be especially useful in the quality improvement world. For example, attribute agreement analysis helps assess the agreement of subjective ratings or classifications given by multiple appraisers. Using this analysis, you can assess if operators in your factory are agreeing on the pass/fail ratings for product samples.

In Minitab 16, choose Stat > Quality Tools > Attribute Agreement Analysis:

Menu Path in Minitab 16

 

In the Attribute column, enter Ratings, in the Samples column, enter Sauce, and in Appraisers, enter Appraiser. Also, be sure to check the box at the bottom of the window for “Categories of attribute data are ordered.” Here’s the Minitab output:

Attribute Agreement Analysis

How to Interpret the Results of the Attribute Agreement Analysis

According to the ‘Between Appraisers’ table above, Sean and I agree on the rating for 7 of the 10 hot sauces. Not bad! I hear that after a while married people tend to look alike, but I guess they tend to “rate” alike too …

The p-value for the overall Kappa value is very low indicating that our agreement is not by chance. The p-value for Kendall’s coefficient of concordance is less than .05 (the typically used value of alpha), which indicates that the ratings between appraisers are associated. Kendall’s coefficient of concordance takes into account the ordinal nature of the data. The Minitab bar chart of ratings versus sauce grouped by appraiser below shows the 3 times that Sean and I didn’t match in our ratings. And those ratings were only apart by 1 unit, with the only disagreements happening on sauces 1, 3, and 6:

Minitab Bar Chart

For more on attribute agreement analysis, check out this document from our tech support team, or the several tutorials available within Minitab Help (Help > Tutorials > Measurement Systems Analysis > Attribute Agreement Analysis, and in the StatGuide: Help > StatGuide > Quality Tools > Attribute Agreement Analysis).

 

Photo of Chili Peppers by Xenia, used under creative commons 2.0 license.  

Doing Gage R&R at the Microscopic Level

$
0
0

by Dan Wolfe, guest blogger

How would you measure a hole that was allowed to vary one tenth the size of a human hair? What if the warmth from holding the part in your hand could take the measurement from good to bad? These are the types of problems that must be dealt with when measuring at the micron level.

As a Six Sigma professional, that was the challenge I was given when Tenneco entered into high-precision manufacturing. In Six Sigma projects “gage studies” and “Measurement System Analysis (MSA)” are used to make sure measurements are reliable and repeatable. It’s tough to imagine doing that type of analysis without statistical software like Minitab.

Tenneco, the company I work for, creates and supplies clean air and ride performance products and systems for cars and commercial vehicles. Tenneco has revenues of $7.4 billion annually, and we expect to grow as stricter vehicle emission regulations take effect in most markets worldwide over the next five years.

We have an active and established Six Sigma community as part of the “Tenneco Global Process Excellence” program, and Minitab is an integral part of training and project work at Tenneco.

Verifying Measurement Systems

Verifying the measurement systems we use in precision manufacturing and assembly is just one instance of how we use Minitab to make data-driven decisions and drive continuous improvement.

Even the smallest of features need to meet specifications. Tolerance ranges on the order of 10 to 20 microns require special processes not only for manufacturing, but also measurement. You can imagine how quickly the level of complexity grows when you consider the fact that we work with multiple suppliers from multiple countries for multiple components.

To gain agreement between suppliers and Tenneco plants on the measurement value of a part, we developed a process to work through the verification of high precision, high accuracy measurement systems such as CMM and vision.

The following SIPOC (Supplier, Input, Process, Output, Customer) process map shows the basic flow of the gage correlation process for new technology.

sipoc

What If a Gage Study Fails?

If any of the gage studies fail to be approved, we launch a problem-solving process. For example, in many cases, the Type 1 results do not agree at the two locations. But given these very small tolerance ranges, seemingly small differences can have significant practical impact on the measurement value. One difference was resolved when the ambient temperature in a CMM lab was found to be out of the expected range. Another occurred when the lens types of two vision systems were not the same.

Below is an example of a series of Type 1 gage studies performed to diagnose a repeatability issue on a vision system. It shows the effect of part replacement (taking the part out of the measurement device, then setting it up again) before each measurement and the bias created by handling the part.

For this study, we took the results of 25 measurements made when simply letting the part sit in the machine and compared them with 25 measurements made when taking the part out and setting it up again between each of 25 measurements. The analysis shows picking the part up, handling it and resetting it in the machine changes the measurement value. This was found to be statistically significant, but not practically significant. Knowing the results of this study helps our process and design engineers understand how to interpret the values given to them by the measurement labs, and give some perspective on the considerations of the part and measurement processes.

The two graphs below show Type 1 studies done with versus without replacement of the part. There is a bias between the two studies. A test for equal variance shows a difference in variance between the two methods.

Type 1 Gage Study with Replacement

Type 1 Gage Study without Replacement

As the scatterplot below illustrates, the study done WITH REPLACEMENT has higher standard deviation. It is statistically significant, but still practically acceptable.

With Replacement vs. Without Replacement

Minitab’s gage study features are a critical part of the gage correlation process we have developed. Minitab has been integrated into Tenneco’s Six Sigma program since it began in 2000.

The powerful analysis and convenient graphing tools are being used daily by our Six Sigma resources for these types of gage studies, problem-solving efforts, quality projects, and many other uses at Tenneco.

 

About the Guest Blogger:

Dan Wolfe is a Certified Lean Six Sigma Master Belt at Tenneco. He has led projects in Engineering, Supply Chain, Manufacturing and Business Processes. In 2006 he was awarded the Tenneco CEO award for Six Sigma. As a Master Black Belt he has led training waves, projects and the development of business process design tools since 2007. Dan holds a BSME from The Ohio State University and an MSME from Oakland University and a degree from the Chrysler Institute of Engineering for Automotive Engineering.

 

Would you like to publish a guest post on the Minitab Blog? Contact publicrelations@minitab.com.

Using Multi-Vari Charts to Analyze Families of Variations

$
0
0

When trying to solve complex problems, you should first list all the suspected variables identify the few critical factors and separate them from the trivial many, which are not essential to understanding the cause.

 

     Ishikawa

 

Many statistical tools enable you to efficiently identify the effects that are statistically significant in order to converge on the root cause of a problem (for example ANOVA, regression, or even designed experiments (DOEs)). In this post though, I am going to focus on a very simple graphical tool, one that is very intuitive, can be used by virtually anyone, and does not require any prior statistical knowledge: the multi-vari chart.

What Is a Multi-Vari Chart?

Multi-vari charts are a way of presenting analysis of variance data in a graphical form, providing a "visual" alternative to analysis of variance.

They can help you carry out an investigation and study patterns of variation from many possible causes on a single chart. They allow you to display positional or cyclical variations in processes. They can also be used to study variations within a subgroup, between subgroups, etc.

A multi-vari chart is an excellent tool to use particularly in the early stages of a search for a root cause. Its main strength is that it enables you to visualize many diverse sources of variations in a single diagram while providing an overall view of the factor effects.

To create a multi-vari chart in Minitab Statistical Software, choose Stat > Quality Tools > Multi-Vari Chart...  Then select your response variable and up to four factors in the dialog box.

Interpreting Multi-Vari Charts

Suppose that you need to analyze waiting times from several call centers that are part of a large financial services company. Customers and potential customers call to open new accounts, get information about credit cards, ask for technical support, and access other services.

Since waiting for a long time while trying to reach an operator may become a very unpleasant experience, making sure callers get a quick response is crucial in building a trusting relationship with your customers. Your customer database has data about customer categories, types of requests, and the time of each phone call. You can use multi-vari graphs to analyze these queuing times.

The multi-vari chart below displays differences between the two call centers (Montpellier and Saint-Quentin: red points on the graph), the weekdays (green points on the graph) and the day hours (several black and white symbols). It suggests that waiting times are longer on Mondays (Mon: in the first part of the graph).

Multivari1

In the following multi-vari graph, the type of requests has been introduced. Notice that the types of request (black and white symbols) generate a large amount of variability. Again it suggests that waiting times are longer on Mondays (the first panel in this plot).

Multivari 2

In the third multi-vari graph, customer categories have been introduced (black and white symbols in the graph). Notice that for request types (the red points in the graph), technical support questions seem to require more time. Again, the queuing times tend to get longer on Mondays.

Multivari 3

In the fourth multi-vari chart, the call centers (the red points), the customer categories (the green points) and the types of requests (black and white symbols) are all displayed. Waiting times seem to be larger at the Montpellier call center. Note that each call center focuses on specific types of requests. For example, technical support calls are only processed at the Montpellier call center. Obviously, the technical support calls (represented by circles with a dot in this plot) are the main issue in this situation. 

Multivari 4

Next Steps After the Multi-Vari Chart

This financial services company needs to better understand why queuing times last longer on Mondays, also longer waiting times for technical support calls need to be dealt with. This conclusion is correct only if the full range of the potential sources of variations, has been considered.

A multi-vari chart provides an excellent visual display of the components of variation associated with each family. However, when there is no obvious dominant factor, or when the “signals” from the process are too “weak” to be detected easily, it is useful to augment the multi-vari graph with more powerful statistical techniques (such as an ANOVA or a regression analysis) to numerically estimate the effects due to each factor.

Hotshot Stats: Evaluating the Service Life of Smokejumper Parachutes

$
0
0

smokejumperIt’s wildfire season out West. Time to be in awe of the destructive power of Nature.

According to active fire maps by the USDA Forest Service, over 300 fires are now burning across a total of 1.5 million acres—including 35 large, uncontained blazes.

Shifting winds, humidity, and terrain can quickly alter a fire's intensity. In extreme conditions, flames can reach over 150 feet, with temperatures exceeding 2000° F.

This ferocious power is matched by only one thing: The incredible strength, courage, and skills of smokejumpers who parachute into remote areas to combat the deadly blazes.

But danger looms before a smokejumper even confronts a fire.

In statistics, we ask: “Can you trust your data?”

For a smokejumper, the critical initial question is: “Can you trust your parachute?”

Smokejumping +  Statistics = Technical Fire Management

When they’re not battling wildfires, many smokejumpers pursue advanced studies in fields like fire management, ecology, forestry, and engineering in the off-season.

At Washington Institute, smokejumpers and other students in the Technical Fire Management (TFM) program apply quantitative methods—often using Minitab Statistical Software—to evaluate alternative solutions to fire management problems.

Dr. Bob Loveless “The students in this program are mid-career wildland firefighters who want to become fire managers, i.e., transition from a technical career path to a professional path in the federal government,” says Dr. Robert Loveless, a statistics instructor for the TFM program.

As part of the  program, the students have to complete, and successfully defend, a project in wildland fire management. One primary analysis tool for these projects is statistics.

“Many students have no, or a limited, background in any college-level coursework,” Loveless noted. "So teaching stats can be a real challenge."

Minitab often helps students overcome that challenge. 

“Most students find using Minitab to be easy and intuitive,” Dr. Loveless told me. That helps them focus on their research objectives without getting lost in tedious calculations or a complex software interface.

Using Minitab to Evaluate the Quality of Smokejumper Parachutes

For his TFM project, Rigging and Research and Development Supervisor for Boise Smokejumpers Steve Stroud used Minitab to evaluate the relationship between the age, the number of jumps used, and the permeability of a smokejumper’s parachute.

The permeability of a parachute is a key measure of its performance. Repeated use and handling cause the nylon fabric to degrade, increasing its permeability. If permeability becomes too high, the chute opens more slowly, the speed of descent increases, and the chute becomes less responsive to steering maneuvers. 

Not things you want to happen when you’re skydiving over the hot zone of raging wildfire.

99% Confidence Intervals for Parachute Permeability

Stroud sampled 70 smokejumper parachutes and recorded their age, number of jumps, and the permeability of cells within each parachute.  permeability tester

Permeability is measured as the airflow through the fabric in cubic feet of air per one square foot per minute (CFM). For a new parachute, industry standards dictate that the CFM should be less than 3.0 CFM. The chute can be safely used until its average permeability exceeds 12.0 CFM, at which time it’s considered unsafe and should be removed from service.

Using the descriptive statistics command in Minitab, the study determined: 

  • Smokejumpers could be 99% confident that the mean permeability in unused parachutes (0-10 years old, with no jumps) was between 1.99 and 2.31 CFM, well within industry standards.

  • Only one unused parachute, an outlier, had a cell with a CFM greater than 3.0 (3.11). Although never used in jumps, this parachute was 10 years old and had been packed and repacked repeatedly.

  • For used parachutes (0-10 years old, with between 1-140 jumps), smokejumpers could be 99% confident that the mean permeability of the parachutes was between 4.23 and 4.61 CFM. The maximum value in the sample, 9.88, was also well below  the upper limit of 12.0 CFM.
Regression Analysis to Estimate Parachute Service Life

The service life for the smokejumper parachutes was 10 years at that time. However, this duration was based on a purchase schedule used by the U.S. military for a different type of parachute with different usage. Smokejumpers use a special rectangular parachute made of pressurized fabric airfoil.

ram air chute

Stroud wanted to determine a working service life appropriate for the expected use and wear of smokejumper chutes. Using Minitab’s regression analysis, he developed a model to predict permeability of smokejumper parachutes based on number of jumps and age (in years). (A logarithmic transformation was used to stabilize the unconstant variance shown by the Minitab residual plots.)

-------------------------------------------------------------------------

Regression Analysis: logPerm versus logJumps, logAge

The regression equation is logPerm = 0.388 + 0.198 logJumps + 0.170 logAge

Predictor        Coef         SE Coef       T            P
Constant      0.38794   0.02859     13.57     0.000
logJumps     0.197808  0.007920   24.97    0.000
logAge         0.17021    0.01704       9.99     0.000

S = 0.196473    R-Sq = 76.6%    R-Sq(adj) = 76.4%

Analysis of Variance
Source                   DF        SS           MS              F           P
Regression           2       56.201   28.100    727.96   0.000
Residual Error   446     17.216    0.039
Total                  448    73.417
-----------------------------------------------------------------------

Both predictors, the number of jumps (log) and age of the parachute (log), were statistically significant (P = 0.000). The coefficient for LogJumps (0.19708) was greater than logAge (0.17021), indicating that number of jumps is a stronger predictor of the permeability of a parachute than its age. The R-Sq value indicates the model explains approximately 75% of the variation in parachute permeability. 

Using the fitted model, the permeability of the chutes can be predicted for a given number of jumps and age. Based on 99% prediction intervals for new observations, the study concluded that the service life of chutes could be extended safely to 20 years and/or 300 jumps before the permeability of any single parachute cell reached an upper prediction limit of 12 CFM.

By adopting this extended service life, Stroud estimated they could save over $700,000 in budget costs over a period of 20 years, while still ensuring the safety of the chutes.

Follow-up: One Good Analysis Leads to Another

Smokejumper BStroud’s TFM student research project, completed in 2010, provided the impetus for further investigation and potential policy change in two federal agencies.  

“The permeability-based service life paper has been implemented in the Bureau of Land Management,“ says Stroud, who is now Assistant Loft Supervisor for the BLM smokejumpers.  “We are in our 4th year of truth testing the model. It has been working very well.”

“The Forest Service (MTDC) has also taken it and is in the process of gathering their initial data set to run the model based on their usage and wear characteristics. Once completed they will be going base to base to gather intelligence for the Forest Service Jumpers.”

Piggybacking off Stroud's original research, those analyses may help put smokejumpers, who face threats from both hot zones and budget constraints, safely into the black.

Acknowledgements: Many thanks to both Bob Loveless and Steve Stroud for their invaluable contributions to this post. True to reputation, smokejumpers strive to go beyond the call of duty: Steve e-mailed me his assistance while he was thousands of feet above the air in a smokejumping plane, with the sign-off “Sent from Space!”

Source:  Stroud, S. Permeability Based Analysis on the BLM Smokejumper Parachute. Washington Institute, Technical Fire Management student projects database.

Photo credits: Smokejumper photos courtesy of Terry McMillan

Additional Links:


Using Minitab Statistical Software to Analyze the Woeful Bengals

$
0
0

Bengalsby Jeff Parks, guest blogger

Being a Cincinnati Bengals fan is tough. It's true that Bengals fans don't have it as bad as, say, long-suffering Chicago Cubs fans...nevertheless, the Bengals haven’t won a playoff game since January 1991. That's currently the longest streak in the NFL. In the 1990s they were voted the worst sports franchise by ESPN. Not the worst football team, mind you, but the worst franchise in all of sports.

Not the L.A. Clippers. Not the Cleveland Browns. Not the Pittsburgh Pirates.

The Cincinnati Bengals.

Why? Why must it be so? What separates the Bengals from the good teams in the NFL? 

During the 1980s they went to the Super Bowl twice. Once they were within about 39 seconds of winning the whole thing. In the 1970s they were competitive with the great Pittsburgh Steelers dynasty, year-in and year-out, for AFC North supremacy.

So what happened?

It was a question like this that sent me on the cathartic journey of writing a book, Applying Six Sigma Tools to the Woeful Bengals: A Fan Laments

As a Six Sigma Master Black Belt for the past 12 years, I've  worked on more than 350 projects in over 15 industries...surely I could bring some of what I know about process improvement to find some way—any way—to improve them “Who Dey” Bengals.

I started this venture by postulating (the “Define” Phase of DMAIC, if you will), what would the Bengals need to do to be  more like today's AFC Champions—the people who play in the Super Bowl like the Bengals once did?

Let’s start with the win-loss record over the past 20-odd years. From 1991 till 2012, the Bengals have average a record of

6 wins
10 losses

For a winning percentage of 37%.  That’s right—37%.

Now look at the percentages for the AFC Champs over that same time period:

YEAR

AFC CHAMP

WINS

LOSSES

TIES

WINNING PCT

1991

Buffalo Bills

13

3

0

81.25%

1992

Buffalo Bills

11

5

0

68.75%

1993

Buffalo Bills

12

4

0

75.00%

1994

San Diego Chargers

11

5

0

68.75%

1995

Pittsburgh Steelers

11

5

0

68.75%

1996

New England Patriots

11

5

0

68.75%

1997

Denver Broncos†

12

4

0

75.00%

1998

Denver Broncos†

14

2

0

87.50%

1999

Tennessee Titans

13

3

0

81.25%

2000

Baltimore Ravens†

12

4

0

75.00%

2001

New England Patriots†

11

5

0

68.75%

2002

Oakland Raiders

11

5

0

68.75%

2003

New England Patriots†

14

2

0

87.50%

2004

New England Patriots†

14

2

0

87.50%

2005

Pittsburgh Steelers†

11

5

0

68.75%

2006

Indianapolis Colts†

12

4

0

75.00%

2007

New England Patriots

16

0

0

100.00%

2008

Pittsburgh Steelers†

12

4

0

75.00%

2009

Indianapolis Colts

14

2

0

87.50%

2010

Pittsburgh Steelers

12

4

0

75.00%

2011

New England Patriots

13

3

0

81.25%

2012

Baltimore Ravens†

10

6

0

62.50%

 

AVERAGE

12

4

0

76.70%

So, on average, the AFC champs won twice as many games (12) as the Bengals did (6) over those 20-odd years from 1991.

We can use Minitab to superimpose those two win-lose curves on the same graph. 

Bengals vs AFC Champs

The Bengals in essence need to:

  • Move the above curve to the right (i.e., increase their average wins per season more in line with the AFC champs).
  • Decrease the width of the curve (i.e., be more consistent in the wins each season).
  • In other words, “shift and narrow” the curve.

A good question to ask right about now would be: “What does it take to produce a good winning percentage—12 or more games in a 16 game schedule—in the NFL?”  It has been said that defense wins championships, but is that really true? To find out, I pulled data from the past 10 years for all NFL teams from the link below:

https://nfldata.com/nfl-stats/team-stats.aspx?sn=14&c=0&dv=0&ta=0&tc=0&st=PointsPerGame&d=1&ls=PointsPerGame

Then I used Minitab to do a regression analysis on “defensive points/game” (how many points does a team’s defense allow each game) as well as “offensive points/game” (how many points does a team’s offense score each game) as “X” or “independent variables.” I wanted to see if any correlation exists for my “Y” or “dependent variable” of “Winning percentage” (number of wins each year divided by 16 total games in a season). My analysis in Minitab produced the following output:

Bengals Regression Analysis

Points per game (Pts/G) for both offense and defense are statistically significant, and the adjusted R-squared value shows the model explains 83.8% of the variation in winning percentage (not too bad of a model).

But which is more important: offense or defense?  Notice the coefficients or the numbers in front of each of “DEFENSE Pts/G” and “OFFENSIVE pts/game” above respectively. These values tell us how much each of the variables impact winning percentage (our “Y”).

Since the defense .0279 is larger than the offense .0273, we know that defense DOES matter more, but not by much.

(Note: that the defensive coefficient is negative, -0.0279, only means that as the defense allows more pts/game then the winning pct goes down. Likewise, if the offense pts/game goes up, so does the winning pct. This should be intuitive, as when any defense stops any opponent from scoring the defense pts/game will go down—and that’s a good thing.)

By comparing the two numbers (their absolute values) we can say that, the defense pts/game has a 2.2% greater impact on winning pct than does the offense.

Maybe Defense does win championships, but not by much.

Now that we know defense matters so much, to really help the Bengals we would need to do a deeper dive into what aspects of the Bengals defense is so lacking when compared to the defense of the AFC Champions. And since the two variables of offense/defense pts/game are so close, we would want to do the same thing for the Bengals’ offense.

For instance I was able to determine that there is a statistically significant difference between the number of sacks the Bengals get each game compared to the AFC Champions over the past 10 years:

Bengals Paired T Test

As I explain in my book, by using Minitab for hypothesis testing, capability analysis, regression, and graphing, I was able to come up with some specific, precise items that the Bengals need to address. (For instance, the sack difference above is totally attributed to the linebackers. The sacks from the defensive line, corner backs and safeties are on par with the AFC Champion teams.)

Will they do it?

I don’t know but I emailed a copy of my book to Paul Brown, the Bengals' general manager—so one can only hope, right?

 

About the Guest Blogger:

Jeff Parks has been a Lean Six Sigma Master Black Belt since 2002 and involved in process improvement work since 1997. He is a former Navy Nuclear Submarine Officer and lives in Louisville, KY with his wife and 7 children. He can be reached at Jwparks407@hotmail.com and via Twitter, @JeffParks3. 

 

Would you like to publish a guest post on the Minitab Blog? Contact publicrelations@minitab.com.

 

Photograph of Bengals quarterback Andy Dalton by Melissa Batson, used under Creative Commons 3.0 license.

 

Curve Fitting with Linear and Nonlinear Regression

$
0
0

Fitted line plot with misspecified linear modelWe often think of a relationship between two variables as a straight line. That is, if you increase the predictor by 1 unit, the response always increases by X units. However, not all data have a linear relationship, and your model must fit the curves present in the data.

This fitted line plot shows the folly of using a line to fit a curved relationship!

How do you fit a curve to your data? Fortunately, Minitab statistical software includes a variety of curve-fitting methods in both linear regression and nonlinear regression.

To compare these methods, I’ll fit models to the somewhat tricky curve in the fitted line plot. For our purposes, we’ll assume that these data come from a low-noise physical process that has a curved function. We want to accurately predict the output given the input. Here are the data to try it yourself!

Fitting Curves with Polynomial Terms in Linear Regression

The most common way to fit curves to the data using linear regression is to include polynomial terms, such as squared or cubed predictors.

Typically, you choose the model order by the number of bends you need in your line. Each increase in the exponent produces one more bend in the curved fitted line. It’s very rare to use more than a cubic term.

Model Order Linear Quadratic Cubic Linear modelQuadratic ModelCubic model

The graph of our data appears to have one bend, so let’s try fitting a quadratic linear model using Stat > Fitted Line Plot.

Fitted line plot with quadratic model

While the R-squared is high, the fitted line plot shows that the regression line systematically over- and under-predicts the data at different points in the curve. This shows that you can’t always trust a high R-squared.

Let’s see if we can do better.

Fitting Curves with Reciprocal Terms in Linear Regression

If your response data descends down to a floor, or ascends up to a ceiling as the input increases (e.g., approaches an asymptote), you can fit this type of curve in linear regression by including the reciprocal (1/X) of one more predictor variables in the model. More generally, you want to use this form when the size of the effect for a predictor variable decreases as its value increases.

Because the slope is a function of 1/X, the slope gets flatter as X increases. For this type of model, X can never equal 0 because you can’t divide by zero.

Looking at our data, it does appear to be flattening out and approaching an asymptote somewhere around 20.

I used Calc > Calculator in Minitab to create a 1/Input column (InvInput). Let’s see how that works! I fit it with both a linear (top) and quadratic model (bottom).

Model with reciprocal term 

 Model with quadratic reciprocal term

For this particular example, the quadratic reciprocal model fits the data much better. The fitted line plots change the x-axis to 1/Input, so it’s hard to see the natural curvature of the data.

In the scatterplot below, I used the equations to plot fitted points for both models in the natural scale. The green data points clearly fall closer to the quadratic line.

Scatterplot to compare models with reciprocal terms

Compared to the quadratic model, the reciprocal model with the quadratic term has a lower S value (good), higher R-squared (good), and it doesn’t exhibit the biased predictions. So far, this is our best model.

Transforming the Variables with Log Functions in Linear Regression

A log transformation is a relatively common method that allows linear regression to perform curve fitting that would otherwise only be possible in nonlinear regression.

For example, the nonlinear function:

Y=eB0X1B1X2B2

can be expressed in linear form of:

Ln Y = B0 + B1lnX1 + B2lnX2

You can take the log of both sides of the equation, like above, which is called the double-log form. Or, you can take the log of just one side, known as the semi-log form. If you take the logs on the predictor side, it can be for all or just some of the predictors.

Log functional forms can be quite powerful, but there are too many combinations to get into detail in this overview. The choice of double-log versus semi-log (for either the response or predictors) depends on the specifics of your data and subject area knowledge. In other words, if you go this route, you’ll need to do some research.

Let’s get back to our example. For data where the curve flattens out as the predictor increases, a semi-log model of the relevant predictor(s) can fit. Let’s try it!

Minitab’s fitted line plot conveniently has the option to log-transform one or both sides of the model. So I’ve transformed just the predictor variable in the fitted line plot below.

Fitted line plot with semi-log model

Visually, we can see that the semi-log model systematically over and under-predicts the data at different points in the curve, just like quadratic model. The S and R-squared values are also virtually identical to that model.

So far, the linear model with the reciprocal terms still provides the best fit for our curved data.

Fitting Curves with Nonlinear Regression

Nonlinear regression can be a powerful alternative to linear regression because it provides the most flexible curve-fitting functionality. The trick is to find the nonlinear function that best fits the specific curve in your data. Fortunately, Minitab provides tools to make that easier.

In the Nonlinear Regression dialog (Stat > Regression > Nonlinear Regression), enter Output for Response. Next, click Use Catalog to choose from the nonlinear functions that Minitab supplies.

We know that our data approaches an asymptote, so we can click on the two Asymptotic Regression functions. The concave version matches our data more closely. Choose that function and click OK.

Nonlinear Regression Catalog of functions

Next, Minitab displays a dialog where we choose our predictor.

Nonlinear Regression predictors dialog box

Enter Input, click OK, and we’re back at the main dialog.

If we click OK in the main dialog, Minitab displays the following dialog:

Nonlinear Regression Parameters dialog

Unlike linear regression, nonlinear regression uses an algorithm to find the best fit step-by-step. We need to supply the starting values for each parameter in the function. Shoot, I don’t have any idea! Fortunately, Minitab makes it easy.

Nonlinear functionLet’s look back at the function we chose. The picture makes it easier!

Notice that Theta1 is the asymptote, or the ceiling, that our data approaches. Judging by the initial scatterplot, that’s about 20 for our data. For a case like ours, where the response approaches a ceiling as the predictor increases, Theta2 > 0 and Theta3 > 0.

Consequently, I’ll enter the following in the dialog:

  • Theta1: 20
  • Theta2: 1
  • Theta3: 1

After we enter these values, we go back to the main dialog, click OK, and voila!

Fitted line plot with nonlinear model

Nonlinear model summary information

It’s impossible to calculate R-squared for nonlinear regression, but the S value for the nonlinear model (0.179746) is nearly as small as that for the reciprocal model (0.134828). You want a small S because it means the data points fall closer to the curved fitted line. The nonlinear model also doesn’t have a systematic bias.

Comparing the Curve-Fitting Effectiveness of the Different Models

Model

R-squared

S

Biased fits

Reciprocal - Quadratic

99.9

0.134828

No

Nonlinear

N/A

0.179746

No

Quadratic

99.0

0.518387

Yes

Semi-Log

98.6

0.565293

Yes

Reciprocal - Linear

90.4

1.49655

Yes

Linear

84.0

1.93253

Yes

The linear model with the quadratic reciprocal term and the nonlinear model both beat the other models. These top two models produce equally good predictions for the curved relationship. However, the linear regression model with the reciprocal terms also produces p-values for the predictors (all significant) and an R-squared (99.9%), none of which you can get for a nonlinear regression model.

For this example, these extra statistics can be handy for reporting, even though the nonlinear results are equally valid. However, in cases where the nonlinear model provides the best fit, you should go with the better fit.

Closing Thoughts

If you have a difficult curve to fit, finding the correct model may seem like an overwhelming task. However, after all the effort to collect the data, it’s worth the effort to find the best fit possible.

When specifying any model, you should let theory and subject-area knowledge guide you. Some areas have standard practices and functions to model the data.

While you want a good fit, you don’t want to artificially inflate the R-squared with an overly complicated model. Be aware that:

Variation Amplification: Even a 3-Year-Old Understands It...Do You?

$
0
0

This weekend my 3-year-old son and I were playing with his marble run set, and he said to me, "The marbles start together, but they don't finish together!"

It dawned on me that the phenomenon he was observing seems so obvious in the context of a marble run, and yet many practitioners fail to see the same thing happening in their processes.  I quickly made a video of me placing six marbles in simultaneously so I could illustrate to others what I will call "variation amplification:"

It is obvious in the video that there is little variation in the positions of the marbles in the beginning, but as they progress through the run the variation in times becomes larger and larger.  In fact, these facts are obvious even to a 3-year-old:

  • The balls spread out as they progress
  • Certain parts of the run cause the balls to spread out more than others
  • The balls do not finish in the same order that they started
  • Some pieces allow balls to change position while others do not

To help further illustrate some of these points, here is a graph (created in Minitab Statistical Software) of each of the six balls at various points in the run:

Time versus Position

At this point, these facts all seem very obvious.  But when working to improve cycle times of a process—whether through lean efforts, a kaizen event, or a Six Sigma project—many practitioners completely fail to take advantage of these characteristics. 

Some will even tell you that times "even out" during the process, and a part that took an exceptionally long time in one step of the process will probably take a short time on another so that parts end up with roughly similar total cycle times. 

In reality, that part is just as likely to take exceptionally long again on another step and be even further from average. This is the essence of variation amplification: variance in cycle times will only increase at each step of the process and, without some control in place, will never decrease.

Consider processes of invoice payments in a finance department—or indeed most other transactional processes, whether in an office, healthcare, or other environment. The points from above can be generalized to:

  • "Parts" starting at the same time will spread apart from one another as they progress through the process, and will not finish together.
  • Certain steps in the process will cause more spread than others.
  • Parts will not complete each step in the same order that they completed the previous step.
  • Only some steps will allow for re-ordering.

So how do we combat variation amplification in transactional processes?  There are multiple lean tools at our disposal. I won't pretend that a few sentences in a blog post can cover everything, but I will offer a few starting points.

  1. Collect data to find out which steps are adding the most to the variation. In the marble run it is obvious that the round "bowls" are the biggest contributors, but in most transactional processes, various steps are electronic and it is difficult to watch a part progress through the process.  Collect data to gain clarity.  Then focus on the biggest contributor(s) first.
     
  2. In most cases, reducing the average time in a step will also reduce the variation.
     
  3. Establish flow so that parts are not re-ordering (FIFO).
     
  4. Allow parts to queue prior to steps that add significant variation. As you reduce the cycle time and variation within that step you can reduce the queue until (hopefully) you establish a pull system, where there is little or no need for queuing.

From a simple marble game a 3-year-old understood variation amplification, and you likely could too when you watched the video.  But can you see that the same phenomenon is happening in transactional processes all around you?

Avoiding a Lean Six Sigma Project Failure

$
0
0

FailureFailure. Just saying the word makes me cringe. And if you’re human, you’ve probably had at least a couple failures in both your work and home life (that you've hopefully been able to overcome).

But when it comes to Lean Six Sigma projects, there’s really nothing worse than having your entire project fail. Sometimes these projects can last months, involve a large project team, and cost companies a lot of money to carry out, so it can be very upsetting for all involved to know that the project failed (for whatever reason).

At Minitab, we’re always talking to our customers and practitioners in the field to better understand how they’re structuring and completing their projects, what tools they’re using, and the challenges and roadblocks they come across. One common reason practitioners have told us their projects weren’t successful is because the solution recommended at project completion was never even implemented.

Understanding why project solutions were never implemented

When we pried a little further, we got some interesting feedback and heard three different reasons why this outcome occurred. The most common reason was that the process owner was not involved in the project from the start.

If you consider the way that many quality improvement initiatives are structured—with a separate quality improvement team or department responsible for completing and actually “owning” projects taking place all over the company—it’s easy to see how a process owner could be left out of a project from time to time. Maybe the process owner is extremely busy doing his day job, and has little time to devote to the project team. Or maybe for various reasons the process owner is never actually interested in the project. Maybe the process owner wants to take charge of the process and find a solution on his own, or maybe the project team responsible for making the process more efficient could streamline the process so much that the process owner could lose his job? These could all be reasons why the process owner never implemented the solution.

Other feedback suggested that maybe solutions were never implemented because the project team followed the DMAIC methodology, but only completed the define, measure, and analyze phases, and never actually made it to the improve or control phases. In other words, they handed off the project after completing the “DMA” of DMAIC, and expected the process owner to take care of the “I” and “C.”

Other practitioners told us that project solutions were not implemented because after the project team did all the work and designed the new process, they shared it with upper-level managers who said something along the lines of, “This is not what we expected.” Management might nix a project solution if it’s too complex, expensive, or simply because it’s not the solution they would have come up with themselves.

How can you keep this from happening to you and your Six Sigma project team?

It might seem pretty simple, but one thing you can do is create a thorough project charter at the outset of each project. What is a project charter? It’s a document, usually completed during the define phase, that answers these basic questions about your project:

  • Why is this project important?
  • Who is responsible for the success of this project?
  • What are the expected benefits of this project?
  • When should the expected benefits begin to accrue, and for how long?
  • Where are improvement efforts being focused?

The information in a project charter is critical for obtaining leadership commitment to provide the necessary resources for completion of the project. Sometimes it can even serve as your “approval” from management to move forward with the project. This tool is one of the principle communication tools for all project stakeholders, so it’s important that you have it filled out clearly and concisely, as well as updating it with changes that may occur as the project progresses.

Here’s an example of the project charter available in Quality Companion. You’ll notice there’s even a field to name your "process owner" and a field for his sign-off:

Project Charter in Quality Companion

Remember, it’s important to include process owners from the start, because they are usually the people responsible for implementing the solution your team recommends. If you do a thorough job on your project charter, you should be able to avoid some of the issues above, and be on your way to completing a successful project!

What are your tips for avoiding a failed project?

Zoom into Minitab

$
0
0

Tired of squinting at your computer screen?  Want to make an impact with the trainees in the last row of your class?  Try zooming in! 

Here are some helpful tips on how you can blow up the size of Minitab Statistical Software screen elements for easier viewing.  Who knew Minitab looked so great close up?

Worksheet Zoom

Select any cell in the worksheet.  Hold down the CTRL key on your keyboard while simultaneously rolling your mouse wheel up and down.  This will zoom the worksheet in and out so that you see more or fewer rows and columns in the window.

Worksheet Zoom

Icon Zoom

From the Tools menu, select Customize.  Click the Options tab in the Customize window then select the “Large Icons” check box. Voila!  Your toolbar icons will instantly double in size.

Icon Zoom

Session Window Zoom

Again, from the Tools menu, select Options.  In the menu tree on the left, click the plus sign next to Session Window to expand the options.  Click I/O Font to see your font options in the right of the dialog box.  Increase the font size to 18 or 20 or more!  The same can be done with the Session Window Title Font option.  Be sure to make the title font a little bit bigger than your I/O font.  

Session Zoom

Even veteran Minitab users are often surprised by some of the lesser-known features in our statistical software. Sign up for one of our upcoming freewebinars to learn more tips and tricks in Minitab!

 

Viewing all 403 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>