Professional Documents
Culture Documents
Statistical Process Control (SPC) For Software Tutorial: Topics
Statistical Process Control (SPC) For Software Tutorial: Topics
Statistical Process Control (SPC) For Software Tutorial: Topics
Statistical Process
Control (SPC) for
Software Tutorial
Anita D. Carleton and Mark C. Paulk
Topics
Introduction
Role of Measurement in Process Management
Activities
Summary
Page 1
1
Carnegie Mellon University
Software Engineering Institute
Module Objectives
Set expectations for the tutorial
Outline
Who Are We?
Agenda
Page 2
2
Carnegie Mellon University
Software Engineering Institute
Administered by Electronic
Systems Center (ESC)
Project Managers
Process Managers/Owners
Working Groups
Professionals
Professionalswhose
whosekey
keyfocus
focusis
ison
onusing
usingmeasurement
measurement
to
tomanage
manageand
andimprove
improvesoftware
softwareprocesses.
processes.
6
Page 3
3
Carnegie Mellon University
Software Engineering Institute
Page 4
4
Carnegie Mellon University
Software Engineering Institute
Page 5
5
Carnegie Mellon University
Software Engineering Institute
Topics
Introduction
Summary
11
Module Objectives
Understand the role of measurement in the
context of software process management
12
Page 6
6
Carnegie Mellon University
Software Engineering Institute
Outline
Process measures are driven by goals and issues
13
14
Page 7
7
Carnegie Mellon University
Software Engineering Institute
16
Page 8
8
Carnegie Mellon University
Software Engineering Institute
Business Goals
Goals, objectives, strategies, and plans in all
organizations are based on two fundamental
needs.
1. providing competitive products or services
in terms of functionality, time-to-market,
quality, and cost
2. meeting commitments to customers with
respect to products and services
18
Page 9
9
Carnegie Mellon University
Software Engineering Institute
Requirements
Ideas Products
Time Work activities &
Services
19
No Remove
Is process assignable
stable? causes
Yes
Is process No Change
capable? process
Yes
Continual
improvement
Measurement
Action 20
Page 10
10
Carnegie Mellon University
Software Engineering Institute
Process Management
Is about successfully managing the work
activities you use for developing,
maintaining, and supporting software
products.
21
22
Page 11
11
Carnegie Mellon University
Software Engineering Institute
23
Page 12
12
Carnegie Mellon University
Software Engineering Institute
25
26
Page 13
13
Carnegie Mellon University
Software Engineering Institute
Process Yes
Management—
No
Select and Define Measures New Issues?
The Bigger No
Yes
Is No Remove
process assignable
stable? causes
Yes
Is No
process Change
capable? process
Yes
Continual
improvement 27
Topics
Introduction
Summary
28
Page 14
14
Carnegie Mellon University
Software Engineering Institute
Module Objectives
Outline five perspectives that are central to
process management
29
Outline
Process performance
Stability
Compliance
Capability
30
Page 15
15
Carnegie Mellon University
Software Engineering Institute
Process Performance
Concern: What is the process producing now
with respect to measurable attributes of quality,
quantity, cost, and time?
Stability
Concern: Is the process that we are managing
behaving predictably?
32
Page 16
16
Carnegie Mellon University
Software Engineering Institute
Compliance
Concerns: Are the processes sufficiently
supported?
33
Capability
Concerns: Is the process capable of delivering
products that meet requirements?
34
Page 17
17
Carnegie Mellon University
Software Engineering Institute
Improvement
Concerns: What can we do to improve the
performance of the process?
Process Management
Perspectives
Process
Performance
Process
Improve
Process
Control Define
Process
Control
Process
Measure
Process
Variability
Execute
Process
Stability
Capability
36
Page 18
18
Carnegie Mellon University
Software Engineering Institute
Process Management
Perspectives
Process
Performance
Improve
Process
Process
Control Define Control Measure
Process Process Process
Variability
Execute
Stability
Process
Capability
38
Page 19
19
Carnegie Mellon University
Software Engineering Institute
39
x
x x
x
x x
x x
x xx
Frequency x
of x
Measured x x
Values x
time
x x
x
x
Variation in
Measured Values
40
Page 20
20
Carnegie Mellon University
Software Engineering Institute
An Example Out-of-Control
Process
x
x
x
x
x x
x x
xx
xx x x
Frequency x x
of
Measurement
Value time
xx
x x
Variation in
Measurement
41
Process Management
Perspectives
Process
Performance Improve
Process
Process
Control Define
Process
Control
Process
Measure
Process
Variability
Execute
Process
Stability
Capability
42
Page 21
21
Carnegie Mellon University
Software Engineering Institute
Process Capability
Process capability = “Voice of the Process”
stable process
Capable process = +
product conformance
Capability ratios
• compare the capability of a predictable process
to the specifications
• are attempts to compare the “voice of the
process” to the “voice of the customer”
Process capability DOES NOT EQUATE TO capable process.
18
16
Customer
14
Requirement
12
Target
10
Upper Limit
Frequency 8 of 12 days
6
0
1 2 3 4 5 6 7 8 9
Days
UCL=10.7
Process Mean = 4.7 days
Days
44
Page 22
22
Carnegie Mellon University
Software Engineering Institute
Upper Spec
Reduce Variation
Changing
Process Upper Spec
Mean
Upper Spec
Shift the Aim
45
No Remove
Is process assignable
stable? causes
Yes
Is process No Change
capable? process
Yes
Continual
improvement
Measurement
Action
46
Page 23
23
Carnegie Mellon University
Software Engineering Institute
47
SPC Questions
Can the software process be stable? Is it?
48
Page 24
24
Carnegie Mellon University
Software Engineering Institute
Topics
Introduction
Summary
49
Module Objectives
Describe some important analytic tools and show
how the tools can be used to help assess the
stability, capability, and performance of a
software process or activity
50
Page 25
25
Carnegie Mellon University
Software Engineering Institute
Outline
Separating signals from noise
Control charts
51
52
Page 26
26
Carnegie Mellon University
Software Engineering Institute
Enumerative Studies -1
Software engineering examples of enumerative
studies include
• inspections of code modules to detect and
count existing defects
• functional or system testing of a software
product to ascertain the extent to which a
product has certain qualities
• measurement of software size to determine
project status or the amount of software under
configuration control
• measurement of staff hours expended, so that
the results can be used to bill customers or
track expenditures against budgets
54
Page 27
27
Carnegie Mellon University
Software Engineering Institute
Enumerative Studies -2
An enumerative study answers questions like
• How many defects were found by inspecting the product
code?
• How many problem reports have been received from
customers?
• How many user manuals do we have on hand?
• How many employees are there in our organization?
• What percent have been trained in object-oriented
design methods?
• How large were the last five products we delivered?
• What was the average size of our code inspection teams
last year?
• How many staff hours were spent on software rework
last month?
55
Analytic Studies
Examples of analytical studies include
• evaluating software tools, technologies, or
methods— for the purpose of selecting among
them for future use
• tracking defect discovery rates to predict
product release dates
• evaluating defect discovery profiles to identify
focal areas for process improvement
• predicting schedules, costs, or operational
reliability
• using control charts to stabilize and improve
software processes or to assess process
capability
56
Page 28
28
Carnegie Mellon University
Software Engineering Institute
57
Stability Concepts
Stable process = Process In Statistical
Control
= Sources of Variability Due
to Common Causes
Quality Quality Quality
Planning Control Improvement
Sporadic
spike
Lessons Learned
J.M. Juran Wilton, CT
Used with the express permission of the Juran Institute, Aug 1990. 58
Page 29
29
Carnegie Mellon University
Software Engineering Institute
Page 30
30
Carnegie Mellon University
Software Engineering Institute
x
x x
x
x x
x x
x xx
Frequency x
of x
Measured x x
Values x
time
x x
x
x
Variation in
Measured Values
61
O O
Average O O CLx
(X-bar) O
LCL
t1 t2 t3 t4 t5
UCLR
Range O
O
(R) CLR
O O
O
t1 t2 t3 t4 t5
62
Page 31
31
Carnegie Mellon University
Software Engineering Institute
An Example Out-of-Control
Process
x
x
x
x
x x
x x
xx
xx x x
Frequency x x
of
Measurement
Value time
xx
x x
Variation in
Measurement
63
O
O
Average O
O CLx
(X-bar)
LCL
t1 t2 t3 t4 t5
O
UCLR
Range O
(R) CLR
O O
O
t1 t2 t3 t4 t5
64
Page 32
32
Carnegie Mellon University
Software Engineering Institute
65
t1 t2 t3 t4 t5
it occurs.
Control charts identify unusual events. They point
you to fixable problems and to potential process
improvements.
66
Page 33
33
Carnegie Mellon University
Software Engineering Institute
67
Control Charts
Two broad classes of control charts
• variable data, which is continuous
• attribute data, which is discrete
68
Page 34
34
Carnegie Mellon University
Software Engineering Institute
Why Is It Important to
Understand the Distinction
Between Variables Data and
Attributes Data?
Because control limits for attributes data are often
computed in ways quite different from control
limits for variables data.
69
Page 35
35
Carnegie Mellon University
Software Engineering Institute
72
Page 36
36
Carnegie Mellon University
Software Engineering Institute
73
Steps for 1
Using Control
process performance
Charts to
Select the appropriate
control charts
Evaluate
4
Measure process performance
over a period of time
Process 5
Use appropriate calculations
Stability
based on measurement data
to determine the center lines
and control limits for the
performance characteristics
6 10
Plot the measurement data on Identify and remove
the control charts assignable causes
8 7 9
Are all
Yes measured values No
Process is
within limits and
stable, continue Process is not stable
distributed randomly
measuring
around the
centerlines?
74
Page 37
37
Carnegie Mellon University
Software Engineering Institute
75
u-chart Assumptions
Assumes a Poisson process
76
Page 38
38
Carnegie Mellon University
Software Engineering Institute
u-chart Formulas
CLu = u = Σ ui / Σ ai
UCLu = u + 3 √ (u / ai)
LCLu = u - 3 √ (u / ai) Defects/ KSLOC for Inspected Modules
60
50
40 UCL
30
20 CL=19.5
10
0 LCL
0 5 10 15 20 25
Module Number
77
Z-chart
Scales u-chart in sigma units
Z i = (ui - u) / σi 3
0
1
-1
3 5 7 9 11 13 15 17 19 21 23 25
Module
Number
78
Page 39
39
Carnegie Mellon University
Software Engineering Institute
XmR Chart
Assumes standard deviation (sigma) is constant
across all observations
79
XmR Chart
Backlog of Unresolved Problem Reports
UCL=32.9
30
26
22
Individual CL=20.4
Values 18
14
10
LCL=7.89
0 5 10 15 20 25 30
16 UCL=15.4
14
12
Moving 10
Range 8
6
4
CL=4.7
2
0
0 5 10 15 20 25 30
Weeks of System
. Test.
Page 40
40
Carnegie Mellon University
Software Engineering Institute
81
Economic Justification
Control charts are important for
• identifying special causes of variation and
removing them
• balancing between false alarms and missed
signals
• determining process stability and capability
82
Page 41
41
Carnegie Mellon University
Software Engineering Institute
Topics
Introduction
Module Objectives
Put measurement in the context of software
project management and software process
improvement.
84
Page 42
42
Carnegie Mellon University
Software Engineering Institute
Outline
Finding and correcting assignable causes
85
86
Page 43
43
Carnegie Mellon University
Software Engineering Institute
Actions That
Clarify Business Goals &Strategy Yes
Follow
New Goals,
Identify and Prioritize Issues Strategy?
Evaluations of No
Yes
Process
Select and Define Measures New Issues?
Yes
Is No Remove
process assignable
stable? causes
Yes
Is No
process Change
capable? process
Yes
Continual
improvement 87
Page 44
44
Carnegie Mellon University
Software Engineering Institute
89
Establishing Stability
90
Page 45
45
Carnegie Mellon University
Software Engineering Institute
Noncompliance as an Assignable
Cause
When investigating compliance as a potential
source of instability, examine
• adherence to the process
• fitness and use of people, tools, technology,
and procedures
• fitness and use of support systems
• organizational factors, such as management
support, organizational changes, personnel
turnover, relocations, downsizing, and so forth
92
Page 46
46
Carnegie Mellon University
Software Engineering Institute
93
Business Questions
Is my process performing according to my
expectations?
Page 47
47
Carnegie Mellon University
Software Engineering Institute
95
96
Page 48
48
Carnegie Mellon University
Software Engineering Institute
97
Run Charts
Cause-and-Effect Diagrams
Histograms
Bar Charts
Pareto Charts
98
Page 49
49
Carnegie Mellon University
Software Engineering Institute
Problem Problem
Identification Analysis
histogram
99
Scatter Diagrams
Display empirically observed relationships
between two process characteristics.
100
Page 50
50
Carnegie Mellon University
Software Engineering Institute
500
400
300
200
100
0
0 10 20 30 40 50 60 70
Size (thousands of executable source lines)
101
Run Charts
Specialized, time-sequenced form of scatter
diagram that can be used to examine data quickly
and informally for trends or other patterns that
occur over time.
102
Page 51
51
Carnegie Mellon University
Software Engineering Institute
16
12
Observed 8
Value 4
0
-4
Time
0 2 4 6 8 10 12 14 16
Cause-and-Effect Diagrams
Allow you to probe for, map, and prioritize a set
of factors that are thought to affect a particular
process, problem, or outcome.
104
Page 52
52
Carnegie Mellon University
Software Engineering Institute
Cause-and-Effect Diagrams -
Example
change control board meets
only once a week
cannot isolate software
artifact(s) containing
problem reports the problem changes decisions
not released in a delays in approving
not logged in properly
timely manner changes
It takes too
long to
Collection Closure process our
Evaluation Resolution software
change
requests
cannot determine
information missing what needs to be done takes time to delays in shipping
from problem reports to fix the problem make changes changes and releases
delays enroute
must reconfigure
cannot replicate baselines
problem
105
Histograms
Displays of empirically observed distributions.
Page 53
53
Carnegie Mellon University
Software Engineering Institute
Histograms - Example
20
18
16
Number of Days
14
12
10
8
6
4
2
0
34 36 38 40 42 44 46 48 50 52 54 56
Product-Service Staff Hours
107
Bar Charts
Similar in many ways to histograms.
They need not be based on measures of
continuous variables or frequency counts.
108
Page 54
54
Carnegie Mellon University
Software Engineering Institute
45
40
35
Percent Defects
Injected
30
Found
25 Escaped
20
15
10
5
0
req’ts design code unit componentsystem customer
analysis test test test use
Software Activity 109
Pareto Charts
Special form of histogram or bar chart.
110
Page 55
55
Carnegie Mellon University
Software Engineering Institute
35
Percent of Total Defects
30
25
20
15
10
0
Syntax Error Ambiguous Interface Error Missing Function Memory
Requirements
Defect Type 111
Topics
Introduction
Summary
112
Page 56
56
Carnegie Mellon University
Software Engineering Institute
Module Objectives
Summarize key concepts and principles
113
114
Page 57
57
Carnegie Mellon University
Software Engineering Institute
Stability
Capability Execute
Process
115
No Remove
Is process assignable
stable? causes
Yes
Is process No Change
capable? process
Yes
Continual
improvement
Measurement
Action
116
Page 58
58
Carnegie Mellon University
Software Engineering Institute
Process Yes
Management—
No
Select and Define Measures New Issues?
The Bigger No
Yes
Is No Remove
process assignable
stable? causes
Yes
Is No
process Change
capable? process
Yes
Continual
improvement 117
Economic Justification
Control charts are important for
• identifying special causes of variation and
removing them
• balancing between false alarms and missed
signals
• determining process stability and capability
118
Page 59
59
Carnegie Mellon University
Software Engineering Institute
Business Questions
Is my process performing according to my
expectations?
120
Page 60
60
Carnegie Mellon University
Software Engineering Institute
SPC Questions
Can the software process be stable? Is it?
121
Summary -1
Use of SPC techniques is not widespread.
122
Page 61
61
Carnegie Mellon University
Software Engineering Institute
Summary -2
The guidebook is intended to assist those
interested in moving towards process
performance measures and process
management.
Page 62
62
Carnegie Mellon University
Software Engineering Institute
125
126
Page 63
63
Carnegie Mellon University
Software Engineering Institute
127
Page 64
64