## The Significance of the Difference Between Two Independent Proportions

RatioDiff computes the same p-values as this stats page. Just Drag and drop your Excel spreadsheet file onto the logo. Two extra sheets will be inserted "z-values" and "p-values"

You can also install this applet as a fully functioning program on your desktop (Look for the logo on your desktop)

### Calculation

The computation is based on the comparison of proportions in paired samples. If the proportion of interest in the first sample
is *p _{a} = k_{a}/n_{a}* and that of the paired sample is

*p*

_{b}= k_{b}/n_{b}*and if the**k*'s are not too small or too big and the_{i}*n*'s are not too small (Ratiodiff make no call on the bigness or smallness of the input values - caveat emptor), then by a well known theorem of statistics the_{i}*p*'s are normally distributed with standard deviation and so is the difference p_{i}_{a}- p_{b}. If*p*is not so different from_{a}*p*we can compute where_{b}*p*is the total proportion*(k*so that_{a}+ k_{b})/(n_{a}+ n_{b})*z*is normally distributed U(0,1). From this the single tailed p value - the probability that a similar sample of*z*is greater than *this**z*is given by where*erf**is the error function*

### Layout of Excel Spreadsheet

The *first* sheet should contain the following layout of numbers.The rows should be marked with the keys `k`

etc. Formatting is irrelevent: we use the regular expression _{a} ... k_{b}`(k|n)\\s*([^\\s=]+)\\s*=`

— that is to say we look for the text k or n followed by some character followed by an equals sign with any spaces in between allowed. The first "column"
will be compared with the others. At the bottom there should be a row giving the totals
marked by `n`

etc.
_{a} ... n_{b}

At the top of sheet one.... |

etc. etc. And near the bottom of sheet one.... |

This work is licenced under a Creative Commons Licence.

*
*