You are on page 1of 26

SOFTWARE METRICS

MEASUREMENT IN EVERY DAY


LIFE

Measurement governs many aspects of


everyday life:

Economic measurement - determine prices, pay raises.

Medical system measurements - diagnosis of specific illnesses.

Measurements in atmospheric systems - weather prediction.

Measure:
Price act as a measure of value of an item in a shop.

Height and size act as a measure in clothing.

Distance and speed act as a measure in journey.

MEASUREMENT
Definition of measurement
MEASUREMENT is the process by which Numbers or
symbols are assigned to attributes of entities in the real world
in such a way as to describe them according to clearly defined
rules.
ENTITY- Object
ATTRIBUTE- Property or characteristics of an entity.
e.g.: room-object
color of the room property of the object.
.

Measurement helps for


understanding,
controlling and
improving the
software

FIVE STAGES OF
MEASUREMENT
1.Scheduli
ng

5. Software
quality

2.Software
sizing

3.Programmi
ng
complexity
4. Software
development
effort
estimation
Software
quality

Scheduling:

A schedule is a listing of a project's activities, and deliverables, usually


with start and finish dates.

Those items are often estimated in terms of resource allocation, budget


and duration, linked by dependencies and scheduled events.

A schedule is commonly used in project planning and project port folio


management parts of project management.

Elements on a schedule may be closely related to the work breakdown


structure, terminal elements, the Statement of work, or a Data
Requirements List.

Software sizing:

Software sizing is an activity, used to estimate the size of a


software

application.

Component in order to be able to implement other software


project management activities.

Size is an inherent characteristic of a piece of software .

Weight is an inherent characteristic of a tangible material.

Programming complexity :

Programming complexity(or software complexity) is a term that


encompasses numerous properties of a piece of software, all of which
affect internal interactions.

There is a difference between the terms complex and complicated.

Complicated implies being difficult to understand but with time and


effort, ultimately knowable.

Complex, on the other hand, describes the interactions between a


number of entities.

The number of entities increases, the number of interactions


between them would increase exponentially,

Similarly, higher levels of complexity in software increase the


risk of unintentionally interfering with interactions .

So increases the chance of introducing defects when making


changes.

Software development effort estimation:

The process of predicting the most realistic amount of


effort (expressed in terms of person-hours or money)
required to develop or maintain software based on
incomplete, uncertain and noisy input.

Effort estimates may be used as input to project plans,


iteration plans, budgets, investment analyses, pricing
processes and bidding rounds.

Software quality:

It is evaluated through the analysis of the software


inner structure, its source code, at the unit level.

The technology level and the system level, which is


in effect how its architecture adheres to sound
principles of software architecture

b)Explain subjective, objective, direct


and indirect measurement

Subjective measure:

It may leave some room for interpretation and may


require human improvement.

Subjective measures are the only way to collect pieces of


information that may be important and useful.

Subjective measure depend on the environment in which


they are made.

Subjective measures can be useful ,as long as we


understand their imprecision.

Objective measure:

Objective measure are defined in a totally unambiguous way


and may be collected through automated tools.

Objective measures are higher quality than subjective


measure.

There are a number of cases in which objective measures


cannot be collected

DIRECT & INDIRECT MEASUREMENT

Direct measurement:
Direct measurement of an attribute of an entity involves no other
attribute or entity.
The length of a physical object can be measured without reference to
any other object or attributes.

E.g.:
Length of source code

measured by lines of code.

Duration of testing process


Number of defects discovered

- measured by pass time in hours.


- measured by counting defects.

Time programmer spends on a project.


(its measured by months worked).

Indirect

measurement:

An attribute must be measured by combining

several of its aspects (e.g.,

density)

Requires a model of how measures are related to each other.


The density of a physical object can be measured only indirectly in term of
mass and volume.
Density

mass
volume

e.g.: programmer productivity

loc produced

person months of effort

module defect density

number of defects
module size

SCALES OF MEASUREMENT
Measurement scale:
Measurement M together with the empirical and
numerical relation system as a measurement scale.

absolute
ratio
interval
ordinal
nomin
al

NOMINAL SCALE

Most primitive form of measurement define classes or categories, and


place each category in a particular class or category
Two major characteristics

Empirical relation consists only of different classes no notion of


ordering.

Any distinct number or symbolic representation is an acceptable


measure no notion of magnitude associated with numbers or
symbols.

Any two mappings, M and M, will be related to each other in that M


can be obtained from M by a one-to-one mapping.

e.g.:
M1(x)=

1 if x is specification
fault
2 if x is design fault
3 if x is code fault

101 if x is
specification fault
2.73 if x is design
fault
M2(x)=
69 if x is code fault

Nominal scale:
It use characters or numbers to establish identity or categories

within

a series.
e.g.:1
In a marathon race, the numbers pinned to the runners are nominal
numbers.
They identify runners, but the numbers do not indicate the order or even
a

predicted race outcome.

E.g.:2
Telephone numbers. It signifies the unique identity of a telephone.
The phone number 961-8224 is not more than 961-8049. Place names
(and

those of people) are nominal too.

Nominal characters and numbers do not suggest a rank order or relative


value; they identify and categorize.

ORDINAL SCALE
Augments nominal scale with ordering information.
Three major characteristics

Empirical relation system consists of classes that are ordered with

respect to the attribute.


Any mapping preserving the ordering (i.e., a monotonic function)

is acceptable.
Numbers represent ranking only, so arithmetic operations have

no meaning.

Set of admissible transformations is set of all monotonic mappings

e.g.:

M1(x)=

1
1
3
4
5

if
if
if
if
if

x
x
x
x
x

is trivial
is simple
is moderate
complex
is in comprehensive

1 if x is trivial
3 if x is simple
2 if x is moderate
4 if x is complex
10 if x is in
comprehensive
M5(x)=

Ordinal scale :
It establish rank order.
e.g.:1
In the race, the order they finished (i.e. 1st, 2nd, and 3rd place) are
measured on an ordinal scale .

e.g.:2
While order is known, how much better one runner is than the other
is

not. The ranks high, medium, and low are also ordinal.

So while we know the rank order, we do not know the interval.


Both numeric and character ordinal data are coded with characters
because ordinal data cannot be added, subtracted, multiplied, or
divided in a meaningful way..

INTERVAL SCALE
Captures information about size of intervals that separate
classes.
Three characteristics

Preserves order

Preserves differences, but not ratios

Addition and subtraction are acceptable, but not


multiplication and division

Class of admissible transformations is the set of affine


transformations:
M=aM+b , where
0 if x is a>0.
1 if x is

e.g.:1
M1(x)=
M3(x)=

trivial
2 if x is
simple
3 if x is
moderate
4 if x is
complex
5 if x is in
comprehensi
ve

trivial
2 if x is
simple
4 if x is
moderate
M2(x)=
6if x is
complex
8 if x is in
comprehensi
ve

3.1 if x is
trivial
5.1if x is
simple
7.1if x is
moderate
9.1 if x is
complex
11.1if x is in
comprehensi
ve

Interval scale:

It

discuss with ratio data, pertains only to numbers; there is no use of

character data.
The

intervalbetween numbers is meaningful.

Interval

data, unlike ratio data, however, do not have a starting point at a true

zero.

Interval numbers can be added and subtracted, division and multiplication do

not make mathematical sense.


e.g.:1
In the marathon race, the time of the day each runner finished is measured on an
interval scale. If the runners finished at 10:10 a.m., 10:20 a.m. and 10:25 a.m., then the
first runner

finished 10 minutes before the second runner and the difference between

the first two runners is twice that of the difference between the second and third place.
not twice as warm as 10 C

RATIO SCALE

Most useful scale, common in physical sciences captures information about ratios
Four characteristics

Preserves ordering, size of intervals between entities, and ratios between


entities

There is a zero element, representing total lack of the attribute

Measurement mapping must start at 0 and increase at equal intervals (units)

All arithmetic can be meaningfully applied to classes in the range of the


mapping.

Acceptable transformations are ratio transformations M=aM, where a is a scalar.

Example program length can be measured by lines of code, number of characters,


etc. Number of characters may be obtained by multiplying the number of lines by
the average number of characters per line.

Ratio scale :
It is similar to interval. The difference is that ratio values have an
absolute or natural zero point.

e.g.:1
In our race, the first place runner finished in a time of 2 hours and
30 minutes,

the second place runner in a time of 2 hours and 40

minutes, and the 450th

place runner took 5 hours .The 450th place

finisher took over five times

longer than the first place runner did

(12.667 hrs / 2.5 hrs = 5.0668).With

ratio data, it makes sense to

say that a 100 lb woman weighs half as much as a 200 lb man, so


weight in pounds is ratio.
Addition, subtraction, multiplication, and division of ratio values

ABSOLUTE SCALE

Most restrictive in terms of admissible transformations


For any two measures, M and M, theres only one admissible

transformation (identity transformation), since theres only one way to


make the measurement.
Four characteristics

Measurement is made simply by counting the number of elements


in the entity set.

Attribute always takes the form of number of occurrences of x in


the entity.

Only one possible measurement mapping, namely the actual count.

All arithmetic analysis of the resulting count is meaningful.

Example lines of code in a module is an absolute scale measure.

SCALES OF MEASUREMENT
Scale type

Admissible
transformation

Examples

Nominal

1-1 mapping

Labeling, classifying
entities

Ordinal

Monotonic increasing
function

Preference, hardness,
air quality,
intelligence tests (raw
scores)

Interval

M=aM+b, a >0

Relative time,
temperature
(Fahrenheit, Celsius),
intelligence tests
(standardized scores)

Ratio

M=aM, a> 0

Time interval, length,


temperature (Kelvin)

Absolute

M=M

Counting entities

You might also like