Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
From the calculator above: If N=7 and p=0.3 you will get exactly 5 successes 2.5% of the time.
If N=8 and p=0.3 you will get exactly 5 successes 4.6% of the time.
If N=30 and p=0.3 you will get 4 or fewer successes 3.0% of the time.
So I think the range of N you need for 95% confidence is 7 to 30.
Function SolveForAlpha(r As Integer, p As Double, alpha As Double) As Integer
Dim q As Integer
'lowest test n we can have is r
q = r
Do Until probGE(q, r, p) >= alpha
q = q + 1
Loop
SolveForAlpha = q
End Function
Function probGE(n As Integer, r As Integer, p As Double) As Double
Dim c As Integer
For c = r To n
probGE = probGE + prob(n, c, p)
Next
End Function
Function prob(n As Integer, r As Integer, p As Double) As Double
prob = p ^ r * (1 - p) ^ (n - r) * nCr(n, r)
End Function
Function nCr(n As Integer, r As Integer) As Double
Dim c As Integer
nCr = fact(n) / fact(r) / fact(n - r)
End Function
Function fact(ByVal n As Integer) As Double
If n <= 0 Then
fact = 1
Else
fact = fact(n - 1) * n
End If
End Function
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.