User’s Guide

The NIAID Stats Calculator application performs two standard hypothesis tests used to determine if there is a statistically significant difference between two groups of data: the Student’s t-test and the Fisher’s exact test. These tests usually require the user to enter long lists of raw data points, which are difficult to work with and which the user may not have. The NIAID Stats Calculator application does not require lists of raw data, working instead from averages and standard deviation. There are two screens, one for each test, which the user can swipe between or select by tapping on the test name.

Installation

The NIAID Stats Calculator is a mobile application that is available in the Google Play Store and the Apple App Store.

Student’s t-test

The Student’s t-test requires the mean (average) 1, standard deviation 2, and sample size for each of the two groups being compared. These numbers are often presented in lieu of the raw data in publications and are easily calculated from the raw data.

The application calculates the Student’s t-test statistic using the unpaired t-test equation 3:

t = mA - mB / srt(Sa^2/nA + Sb^2/nB)

where mA, mB, nA, nB, Sa, and Sb are the means, sizes, and standard deviations of groups A and B respectively. It then uses the test statistic to calculate the p-value for the Welch’s t-test using the formula

I_n/(t^2+n)(n/2, 1/2)

The code is based on the R code for the pt() function 4 and provides corrections for extremely large values of n to avoid buffer overflow.

Fisher’s exact test

The Fisher’s exact test requires the number of samples that passed/were positive and failed/were negative for each test group. For the purposes of the Simple BioStats application, the test is limited to a 2x2 matrix although in general the Fisher’s exact test can handle larger matrices. By limiting the user to a 2x2 matrix, the application can provide the Chi-square test as an approximation for the Fisher’s exact test for large data sets.

The application calculates the two-tailed, left-tailed, and right-tailed probabilities and presents them to the user. It is up to the user to know which calculation is appropriate 5 for their data set. The test statistic and p-value will be presented along with the odds ratio and confidence interval for each test. The odds ratio is calculated using a maximum likelihood estimate translated from R.