In unit testing of a model, it was found that for a set of test data, at most…
2018
In unit testing of a model, it was found that for a set of test data, at most 90% of the code was tested, with a success probability of 0.9 on the tested part. Then the reliability of the model is:
- A.
greater than 0.9
- B.
equal to 0.9
- C.
at most 0.81
- D.
at least 1/0.81
Attempted by 10 students.
Show answer & explanation
Correct answer: C
Concept: This question follows the standard test-coverage-based reliability-estimation convention used in software-testing exam questions of this kind — not a general probabilistic derivation valid for every execution-frequency distribution, but the specific convention this question (and its answer key) is built on: the reliability figure the test data can support is taken as the product of (i) the fraction of the code that was actually exercised by tests and (ii) the observed success probability on that exercised fraction, because the untested remainder carries no test-based guarantee at all. Under this convention, the resulting figure is an upper bound (a ceiling) on the demonstrated reliability, never an exact, guaranteed value.
Let f be the fraction of the code that was actually tested: here f is at the maximum 0.9 (90%), i.e. up to 90% of the code, possibly less.
Let p be the probability of success recorded on that tested portion: here p = 0.9.
Under this convention, the reliability the test data can support for the whole model is the product of these two factors: R ≤ f × p = 0.9 × 0.9 = 0.81.
Since f is stated as a maximum rather than an exact figure, the resulting reliability cannot be asserted to be exactly 0.81 or higher — it can only be said to be at most 0.81.
Cross-check against the other readings:
A value above 0.9 would need the untested part of the code to also be guaranteed correct, which the test data never establishes.
A value of exactly 0.9 would hold only if all of the code, not just up to 90% of it, had been exercised by the tests.
A value of 1/0.81 (about 1.235) is impossible outright, since reliability is a probability and can never exceed 1.
So, under the standard estimation convention this question is built on, the reliability supported by this test data is at most 0.81.