Welcome to the Interactive Probability and Statistics Application (IPSA)
This application is used for understanding the probabilistic and statistical concepts used in evaluating evidence in forensic science.
The application uses interactive examples so that you can explore how different values and assumptions can affect probabilistic and statistical conclusions.
On the tab to the left of the application you can find the different examples. Within each tab there are some sub-tabs, which demonstrate different ideas using similar scenarios.
You can use any example in any order that you prefer, but if you are unsure where to begin then start with the top one and work your way down the list of tabs.
If you would like to learn more about the ideas introduced here then you can read about them in our interactive probability and statistics book.
We hope that you enjoy learning using this app.
Development information
This application was developed by Mr Roy Mudie (Application Specialist) and Dr Harry Gray (Harding Fellow) at the Leverhulme Research Centre for Forensic Science (LRCFS). The principal investigator for this project is Professor Niamh Nic Daéid.
Number of tosses and probability of heads
Probability Tree
This tree displays the probability for each outcome.
Expected Frequency Tree
This tree displays the expected frequency of each outcome for a certain number of tosses.
Sample Frequency Tree
This tree displays the sample frequency of each outcome for a certain number of tosses.
Coin Tosses
This plot shows the outcomes of each coin toss in the order in which they occurred.
Sample proportion of heads/tails with each coin toss
This plot shows the sample proportion of heads/tails and how it changed as the coin was being tossed.
Total Number of Heads/Tails
This plot shows the total number of heads and tails in the sample.
Distribution of the sample proportion of Heads
Use the buttons below to re-run the sample of coin tosses. This plot displays the sample proportion of heads for each sample together in what is known as a box plot.
The line through the centre of the box shows the median proportion of heads for the samples. This is the value for which half of the samples had a higher sample proportion of heads, and half of the samples had a lower sample proportion of heads.
The size of the box shows the central 50% of sample proportions for the samples - one quarter of the sample values are above the box, and one quarter are below the box.
Any dots outside of the box are known as outliers - values which are extreme compared to the other sample proportions that were observed.
The lines between the boxes and the outliers are known as whiskers and they show the range of values that are not considered to be outliers.
Number of tosses and probability of heads
Probability Tree
This tree displays the probability for each outcome.
Expected Frequency Tree
This tree displays the expected frequency of each outcome for a certain number of tosses.
Double Coin Toss - Samples
In this example we consider the expected outcomes and the sample frequencies from a double coin toss. Please see the 'Double Toss Probabilities' tab if you need a recap of this example.
A 'sample' for the double coin tosses consists of tossing coin 1 followed by coin 2 and then repeating this. For example, a possible outcome for a sample of size 2 could be heads/heads, heads/tails.
As with the single coin toss samples, the double coin toss samples are almost guaranteed to be different from the expectations of a probability model.
Use the sliders below to change the number of double tosses and the probability of heads for the coins to generate a sample of double tosses and view the results in the graphs below.
Number of double coin tosses and probability of heads
Probability Tree
This tree displays the probability for each outcome.
Expected Frequency Tree
This tree displays the expected frequency of each outcome for a certain number of double tosses.
Sample Frequency Tree
This tree displays the sample frequency of each outcome for a certain number of double tosses.
Visualisation of Tosses
This plot shows the outcomes of the coin tosses for each coin and the order in which they occurred.
Tosses of Coin 1
Coin 1 Heads
Coin 1 Tails
Tosses of Coin 2 after coin 1 heads
Tosses of Coin 2 after coin 1 tails
Coin 2 Heads after Coin 1 Heads
Coin 2 Tails after Coin 1 Heads
Coin 2 Heads after Coin 1 Tails
Coin 2 Tails after Coin 1 Tails
Sample proportion of outcomes with each double toss
This plot shows the sample proportion of each outcome and how it changed as the coins were being tossed.
Number of double coin tosses and probability of heads
Probability Tree
This tree displays the probability for each outcome.
Expected Frequency Tree
This tree displays the expected frequency of each outcome for a certain number of double tosses.
Disease and Test Information
Test sensitivity: 0.95
The sensitivity of the disease test is the probability that it returns a positive test result when the tested person has the disease.
Test specificity: 0.95
The specificity of the disease test is the probability that it returns a negative test result when the tested person is disease-free.
Disease and test results
This tree shows the test results for a population of people for the base rate and test details given in the box opposite.
Doping Test Properties
In this box you can control the sensitivity and specificity of the test. You can see the effects of the changes that you make in the text description and tree diagram below.
One way to understand the effects of the sensitivity or specificity is to change only one of the sliders at a time and see how that affects the results. For example, which side of the tree diagram does the sensitivity value affect? What does this mean for the number of true positive test results?
Text description of results
Doping status and test results
Doping Test Properties
In this box you can control the sensitivity and specificity of the test. You can see the effects of the changes that you make in the text description and calculations below.
Prior Odds
The box opposite contains the calculations for the prior odds in this doping example. The probability that any randomly selected athlete is doping is determined by the base rate, 0.02. Since athletes are either doping or not doping and cannot be doing both then these probabilities are exhaustive and mutually exclusive and so must sum to 1. This makes the probability that a randomly selected athlete is not doping equal to 0.98.
The prior odds compares the size of these two probabilities, giving odds of roughly 0.02. This can be interpreted as any randomly selected athlete is 0.02 times as likely to be doping as not doping. In other words, they are far less likely to be doping and much more likely to not be doping when randomly selected.
Prior Odds Calculation
Likelihood Ratio
Likelihood Ratio Calculation
Posterior Odds
Posterior Odds Calculation
LR calculator
Enter values for the conditional probabilities below. You may try values greater than 1 to test more general likelihoods. You can also see the mathematical expression for computing the LR.