Figure 5: Code for calculating the statistics required by Z test for two proportions and the Z score result