All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Isaac To <isaac.to@gmail.com>
Cc: perfbook@vger.kernel.org
Subject: Re: Error report: perfbook Section 11.6.3.2
Date: Tue, 22 Jul 2014 08:57:30 -0700	[thread overview]
Message-ID: <20140722155730.GA11241@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAOArY3XAD986MWLXcnG3VsYk40jyRgK8N+aWHniOnNJUTbmy9w@mail.gmail.com>

On Mon, Jul 21, 2014 at 04:24:26PM +0800, Isaac To wrote:
> Hi,
> 
> Thanks a lot for the free book, it is very useful!

Glad you like it!

> I'd like to point out an error I see in Section 11.6.3.2, after Quick Quiz
> 11.10.  It says the following:
> 
>   Suppose that a given test fails about once every hour, but after a bug fix,
>   a 24-hour test run fails only twice. What is the probability of this being
>   due to random chance, in other words, what is the probability that the fix
>   had no statistical effect?
> 
> In other parts of the book, care has been taken to say something like
> "confidence level" to make the probability statements correct.  Not here.
> 
> The only thing that we know about the probability of failing after the
> experiment is that "the probability of the test failing now is not zero".
> To know the "probability of this being due to random chance", or
> "probability that the fix had no effect", requires the knowledge of the
> behaviour of the bug itself (or, at least, the prior probability that the
> perhaps buggy system has a certain behaviour), and it is not specified in
> the question.  E.g., in an extreme world that the test can only fail at a
> rate of once every hour or never at all, we must admit that we are very
> very lucky during this particular test.
> 
> The probability being calculated needs to be specified like "the
> probability of this happening *in case* the fix has no effect".  That "the
> fix has no effect" needs to be a *prerequisite*, and cannot itself be the
> probability to be computed.  The complement, i.e., 1 - 1.2e-8, is "the
> confidence level that the probability of failing is less than the
> original".  I'd suggest using the "confidence level" wording here, but
> explain what it is earlier in the book to tell the less mathematically apt
> readers understand the wordings.

Good catch!

How about if I reworded that paragraph as follows?

	Suppose that a given test fails about once every hour, but after a
	bug fix, a 24-hour test run fails only twice.  Assuming that the
	failure leading to the bug is a random occurrence, and further
	assuming that the alleged fix actually had no effect on this
	particular bug, what is the probability that the small number
	of failures in the second run was due to random chance? This
	probability may be calculated by summing Equation 11.26 as
	follows:

I am shying away from explaining "confidence level" because I haven't
yet come up with a compact and accurate way of doing so.  However, I am
taking this email as encouragement to keep trying.  ;-)

							Thanx, Paul

PS.  Congratulations!  You are the first to use the new mailing list
     to report a bug in this book.  ;-)


  reply	other threads:[~2014-07-22 15:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21  8:24 Error report: perfbook Section 11.6.3.2 Isaac To
2014-07-22 15:57 ` Paul E. McKenney [this message]
2014-07-26  8:47   ` Isaac To
2014-07-26 16:51     ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140722155730.GA11241@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=isaac.to@gmail.com \
    --cc=perfbook@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.