Software defects in NASA spacecraft instrument code.

Chapter 3, Problem 76E

(choose chapter or problem)

Get Unlimited Answers
QUESTION:

Problem 76E

Software defects in NASA spacecraft instrument code. Portions of computer software code that may contain undetected defects are called blind spots. The issue of blind spots in software code evaluation was addressed at the 8th IEEE International Symposium on High Assurance Software Engineering (March 2004). The researchers developed guidelines for assessing methods of predicting software defects using data on 498 modules of software code written in “C” language for a NASA spacecraft instrument. One simple prediction algorithm is to count the lines of code in the module; any module with more than 50 lines of code is predicted to have a defect. The accompanying file contains the predicted and actual defect status of all 498 modules. A standard approach to evaluating a software defect prediction algorithm is to form a two-way summary table similar to the one shown here. In the table, a, b, c, and d represent the number of modules in each cell. Software engineers use these table entries to compute several probability measures, called accuracy, detection rate, false alarm rate, and precision.

Module has defects

False

True

Algorithm

No

a

b

Predicts Defects

Yes

c

d

a. Accuracy is defined as the probability that the prediction algorithm is correct. Write a formula for accuracy as a function of the table values a, b, c, and d.

b. The detection rate is defined as the probability that the algorithm predicts a defect, given that the module actually is a defect. Write a formula for detection rate as a function of the table values a, b, c, and d.

c. The false alarm rate is defined as the probability that the algorithm predicts a defect, given that the module actually has no defect. Write a formula for false alarm rate as a function of the table values a, b, c, and d.

d. Precision is defined as the probability that the module has a defect, given that the algorithm predicts a defect. Write a formula for precision as a function of the table values a, b, c, and d.

e. Access the accompanying file and compute the values of accuracy, detection rate, false alarm rate, and precision. Interpret the results.

Questions & Answers

QUESTION:

Problem 76E

Software defects in NASA spacecraft instrument code. Portions of computer software code that may contain undetected defects are called blind spots. The issue of blind spots in software code evaluation was addressed at the 8th IEEE International Symposium on High Assurance Software Engineering (March 2004). The researchers developed guidelines for assessing methods of predicting software defects using data on 498 modules of software code written in “C” language for a NASA spacecraft instrument. One simple prediction algorithm is to count the lines of code in the module; any module with more than 50 lines of code is predicted to have a defect. The accompanying file contains the predicted and actual defect status of all 498 modules. A standard approach to evaluating a software defect prediction algorithm is to form a two-way summary table similar to the one shown here. In the table, a, b, c, and d represent the number of modules in each cell. Software engineers use these table entries to compute several probability measures, called accuracy, detection rate, false alarm rate, and precision.

Module has defects

False

True

Algorithm

No

a

b

Predicts Defects

Yes

c

d

a. Accuracy is defined as the probability that the prediction algorithm is correct. Write a formula for accuracy as a function of the table values a, b, c, and d.

b. The detection rate is defined as the probability that the algorithm predicts a defect, given that the module actually is a defect. Write a formula for detection rate as a function of the table values a, b, c, and d.

c. The false alarm rate is defined as the probability that the algorithm predicts a defect, given that the module actually has no defect. Write a formula for false alarm rate as a function of the table values a, b, c, and d.

d. Precision is defined as the probability that the module has a defect, given that the algorithm predicts a defect. Write a formula for precision as a function of the table values a, b, c, and d.

e. Access the accompanying file and compute the values of accuracy, detection rate, false alarm rate, and precision. Interpret the results.

ANSWER:

Solution

Step 1 of 5:

Let a, b, c, and d represent the number of modules in each cell.

Then the table is given below.

Module has defects

False

True

Algorithm

No

a

b

Predicts Defects

Yes

c

d

Our goal is:

a). We need to write a formula for accuracy as a function of the table values a, b, c, and d.

b). We need to write a formula for the detection rate as function of the table values a, b, c, and d.

c). We need to write a formula for false alarm rate as a function of the table values a, b, c, and d.

d). We need to write a formula for precision as a function of the table values a, b, c, and d.

e). we have to compute the values of accuracy, detection rate, false rate, and precision and interpret the result.

a).

Accuracy is defined as the probability that the prediction algorithm is correct.

Now we have to write a formula for accuracy as a function of the table values a, b, c, and d.

Now we define the following events.

Algorithm predicts defects is A.

Module has defects is B and

Algorithm correct is C.

Then accuracy is

Accuracy = the probability of algorithm is correct.

Accuracy = P(C)

Accuracy = P(AB) + P()

Where P(AB) =  and P() =  

Accuracy =

Accuracy =

Therefore,  Accuracy = .


Add to cart


Study Tools You Might Need

Not The Solution You Need? Search for Your Answer Here:

×

Login

Login or Sign up for access to all of our study tools and educational content!

Forgot password?
Register Now

×

Register

Sign up for access to all content on our site!

Or login if you already have an account

×

Reset password

If you have an active account we’ll send you an e-mail for password recovery

Or login if you have your password back