Problem

What is the success/failure ratio of space launches?
For more details on statistics of space launches see http://en.wikipedia.org/wiki/Comparison_of_orbital_launchers_families.

Null hypothesis

From wikipedia link (above), 176 failures from 3024 launches comprise probability of failure \(Q = 176/3024=0.058\). We believe the true value for success probability \(P=1-Q\) must be 0.94. So our null hypothesis \(H0|P=0.94\), while alternative is \(H1|P<0.94\). We use binom.test to verify it.

library(pwr)
library(binom)

binom.test(x=(3024-176),n=3024,p = 0.94,alternative = "less",conf.level = 0.99)
## 
##  Exact binomial test
## 
## data:  (3024 - 176) and 3024
## number of successes = 2848, number of trials = 3024, p-value =
## 0.6722
## alternative hypothesis: true probability of success is less than 0.94
## 99 percent confidence interval:
##  0.0000000 0.9512844
## sample estimates:
## probability of success 
##              0.9417989
binom.power(p.alt = 0.92,n = 3024,p = 0.94,alternative = "less",method = "exact")
## [1] 0.9964386

The p-value for test is greater than 0.05, so our null hypothesis can not be rejected: the probaility of false rejecting H0 is more than 67%. The power of test is more than 99%.

Z-test for two proportions

Now we want to verify is there any difference in proportion of success for Ariane 5 (EU) (https://en.wikipedia.org/wiki/Ariane_5) and Delta IV (USA) (https://en.wikipedia.org/wiki/Delta_IV). We believe the two proportions for success must be equal. So our null hypothesis \(H0|P1=P2\), while alternative is \(H1|P1<>P2\). So we use the formula below and the code from http://www.r-bloggers.com/comparison-of-two-proportions-parametric-z-test-and-non-parametric-chi-squared-methods/ : \[Z=\frac{\frac{x_1}{n_1}-\frac{x_2}{n_s}}{\sqrt{\widehat{p}(1-\widehat{p})(\frac{1}{n_1}+\frac{1}{n_2})}}\]

z.prop = function(x1,x2,n1,n2){
numerator = (x1/n1) - (x2/n2)
p.common = (x1+x2) / (n1+n2)
denominator = sqrt(p.common * (1-p.common) * (1/n1 + 1/n2))
z.prop.ris = numerator / denominator
return(z.prop.ris)}

qz=z.prop(x1 = 77,x2 = 29,n1 = 81,n2 = 30)
qz
## [1] -0.3620637
pnorm(qz,0,1)*2
## [1] 0.7173044

Also, we can do the same Z-test using online calculator http://www.socscistatistics.com/tests/ztest/Default2.aspx.

The Z-value is -0.362 and the p-Value is 0.717. The result is not significant. we can not reject H0: the probaility of false rejecting H0 is more than 71%. There is no difference in proportion of success for Ariane 5 (0.951) and Delta IV (0.966). In fact both have more reliability, while comparing overall launches statistics (0.94).