Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

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 AssuranceSoftware 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.

a. Accuracy is defined as the probability that the prediction algorithm is correct. Write a formula for accuracyas 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 the probability that the algorithm predicts a defect, given that the module has no defect. Write a formula for false alarm rates 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 accuracy, detection rate, false alarm rate, and precision values. Interpret the results.

Short Answer

Expert verified
  1. The probability isP=a+da+b+c+d
  2. The probability isP=db+d
  3. The probability isP=ca+c
  4. The probability isP=dc+d
  5. The values of accuracy, detection rate, false alarm rate, and precision are84.34%,40.82%,10.91%and28.99%

Step by step solution

01

Important formula

The formula for probability isP=favourableoutcomestotaloutcomes

02

(a) The probability that the prediction algorithm is correct

Here the outcomes are a, b, c, d., and thefavorable outcome are a and d.

So, the probability is P=a+da+b+c+d.

03

(b) Write a formula for detection rate as a function of the table values a, b, c, and d

Here the outcomes are b, d. and the favorable outcome is d.

Thus, the probability is P=db+d.

04

(c) Write a formula for false alarm rate as a function of the table values a, b, c, and d

Here the outcomes are a, c., and the favorable outcome is c.

Hence, the probability isP=ca+c .

05

(d) Write a formula for precision as a function of the table values a, b, c, and d

Here the outcomes are c, d, and the favorable outcome is d.

Accordingly, the probability isP=dc+d .

06

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

From the algorithms, the values are:

The value for accuracy:

P=a+da+b+c+d=400+20400+29+49+20=420498=84.34%

The value for detection rate:

P=db+d=2029+20=40.82%

The value for false alarm rate:

P=ca+c=49400+49=10.91%

The value for precision:

P=ca+c=49400+49=10.91%

Therefore, the values of accuracy, detection rate, false alarm rate, and precision are 84.34%,40.82%,10.91%and28.99%.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Blood diamonds.According to Global Research News(March 4, 2014), one-fourth of all rough diamonds producedin the world are blood diamonds. (Any diamond that is mined in a war zone—often by children—to finance a warlord’s activity, an insurgency, or an invading army’s effort is considered a blood diamond.) Also, 90% of the world’s rough diamonds are processed in Surat, India, and, of these diamonds one-third are blood diamonds.

a.Find the probability that a rough diamond is not a blood diamond.

b.Find the probability that a rough diamond is processed in Surat and is a blood diamond.

Simulate the experiment described in Exercise 3.7 using any five identically shaped objects, two of which are one colour and the three another colour. Mix the objects, draw two, record the results, and then replace the objects. Repeat the experiment a large number of times (at least 100). Calculate the proportion of time events A, B, and C occur. How do these proportions compare with the probabilities you calculated in Exercise 3.7? Should these proportions equal the probabilities? Explain.

Two fair coins are tossed, and the following events are defined:

A: [Observe one head and one tail.]

B: [Observe at least one head.]

a. Define the possible sample points and assign probabilities to each.

b. Draw a Venn diagram for the experiment, showing the sample points and events A and B.

c. Find P(A), P(B) andP(AB).

d. Use the formula for conditional probability to find P (A/B)and P (B/A). Verify your answer by inspecting the Venn diagram and using the concept of reduced sample spaces.

Chance of winning at “craps.” A version of the dice game“craps” is played in the following manner. A player starts by rolling two balanced dice. If the roll (the sum of the two numbers showing on the dice) results in a 7 or 11, the player wins. If the roll results in a 2 or a 3 (called craps), the player loses. For any other roll outcome, the player continues to throw the dice until the original roll outcome recurs (in which case the player wins) or until a 7 occurs

(in which case the player loses).

a. What is the probability that a player wins the game on the first roll of the dice?

b. What is the probability that a player loses the game on the first roll of the dice?

c. If the player throws a total of 4 on the first roll, what is the probability that the game ends (win or lose) on the next roll?

Most likely coin-tossing sequence. In Parade Magazine’s (November 26, 2000) column “Ask Marilyn,” the following question was posed: “I have just tossed a [balanced] coin 10 times, and I ask you to guess which of the following three sequences was the result. One (and only one) of the sequences is genuine.”

(1) H HHHHHHHHH

(2) H H T T H T T H HH

(3) T TTTTTTTTT

  1. Demonstrate that prior to actually tossing the coins, thethree sequences are equally likely to occur.
  2. Find the probability that the 10 coin tosses result in all heads or all tails.
  3. Find the probability that the 10 coin tosses result in a mix of heads and tails.
  4. Marilyn’s answer to the question posed was “Though the chances of the three specific sequences occurring randomly are equal . . . it’s reasonable for us to choose sequence (2) as the most likely genuine result.” If you know that only one of the three sequences actually occurred, explain why Marilyn’s answer is correct. [Hint: Compare the probabilities in parts b and c.]
See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free