# A statistical analysis of a malfunctioning hot water heater

Our hot water heater is broken. Or rather, it sometimes is. A while ago my flatmate and I noticed that sometimes, while taking a nice hot shower, the hot water turns cold. And that sucks big time. Our heater is in the kitchen and uses natural gas. It seems like sometimes the flame just goes out. We asked a friend who fixes these things for a living and after describing the symptoms to him, he suggested we open a kitchen window while showering. The reason for the flame going out might be that there is a build-up of exhaust gases and the safety kicking in to prevent people from suffocating. Opening a window would increase the chimney effect and thus temporarily solve the problem.

Sound advice, but there is one problem: How do we know opening a window actually works, if the problem only occurs sporadically to begin with? We don’t want to end up believing in tiger repellent rocks.

The answer — of course — is: Science!

Step 1: Taking data

So we started to keep count of whether or not the water turns cold while taking a shower and whether or not a window was open. The tally so far:

window open window closed
water stays hot 21 16
water turns cold 0 7

Let’s see what conclusions we can draw from this. On to…

Step 2: Data analysis

Seems easy enough, right? At single glance we can see that the probability of a unpleasant shower interruption is about 30% with the windows closed and 0% with windows open:

$\begin{array}{rll} p_{c} & = N_{cb} / (N_{cb} + N_{cg}) & \\ & = N_{cb} / N_c & = 0.304 \\ p_{o} & = N_{ob} / (N_{ob} + N_{og}) & \\ & = N_{ob} / N_o & = 0.0 \end{array}$

Here, as you probably already guessed right, pc and po are the probability of the water turning cold for closed and open windows respectively. Also Ncb and Ncg are the number of times we took a bad (cold) and good (hot) shower with a closed window and Nob and Nog are the same for open window showers.

This is all well and good, but if you read my last article, you are probably wondering right now: Where are my error estimates? And you are right to do so. Again, things are unfortunately not as easy as they appear.

The fall-back way to estimate an error is to repeat your experiment a couple of times and then to calculate the standard deviation of those results. This always works, but it’s not always feasible. If you want to estimate the error on your measurement with only the given data, you have no choice but to understand the statistical processes behind your experiment and use some maths.

And that is what we will do.

Advertisements