Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_sample.wasp
Title produced by softwareMinimum Sample Size - Testing Proportions
Date of computationSun, 02 Dec 2012 10:13:40 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/02/t1354461986ncecpw9ld5rcyi6.htm/, Retrieved Thu, 28 Mar 2024 13:44:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=195539, Retrieved Thu, 28 Mar 2024 13:44:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordscalculation based on difference of proportions at 15%
Estimated Impact81
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Minimum Sample Size - Testing Proportions] [IC-AL sample size...] [2012-12-02 15:13:40] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ yule.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 2 seconds \tabularnewline
R Server & 'George Udny Yule' @ yule.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=195539&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ yule.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=195539&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=195539&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ yule.wessa.net







Minimum Sample Size
Population Size20000
Margin of Error0.05
Confidence0.95
Power0.9
Response Distribution (Proportion)0.15
z(alpha/2) + z(beta)3.24151555008465
z(alpha) + z(beta)2.92640519249607
Minimum Sample Size (2 sided test)521.920374787405
Minimum Sample Size (1 sided test)427.44316412031

\begin{tabular}{lllllllll}
\hline
Minimum Sample Size \tabularnewline
Population Size & 20000 \tabularnewline
Margin of Error & 0.05 \tabularnewline
Confidence & 0.95 \tabularnewline
Power & 0.9 \tabularnewline
Response Distribution (Proportion) & 0.15 \tabularnewline
z(alpha/2) + z(beta) & 3.24151555008465 \tabularnewline
z(alpha) + z(beta) & 2.92640519249607 \tabularnewline
Minimum Sample Size (2 sided test) & 521.920374787405 \tabularnewline
Minimum Sample Size (1 sided test) & 427.44316412031 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=195539&T=1

[TABLE]
[ROW][C]Minimum Sample Size[/C][/ROW]
[ROW][C]Population Size[/C][C]20000[/C][/ROW]
[ROW][C]Margin of Error[/C][C]0.05[/C][/ROW]
[ROW][C]Confidence[/C][C]0.95[/C][/ROW]
[ROW][C]Power[/C][C]0.9[/C][/ROW]
[ROW][C]Response Distribution (Proportion)[/C][C]0.15[/C][/ROW]
[ROW][C]z(alpha/2) + z(beta)[/C][C]3.24151555008465[/C][/ROW]
[ROW][C]z(alpha) + z(beta)[/C][C]2.92640519249607[/C][/ROW]
[ROW][C]Minimum Sample Size (2 sided test)[/C][C]521.920374787405[/C][/ROW]
[ROW][C]Minimum Sample Size (1 sided test)[/C][C]427.44316412031[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=195539&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=195539&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Minimum Sample Size
Population Size20000
Margin of Error0.05
Confidence0.95
Power0.9
Response Distribution (Proportion)0.15
z(alpha/2) + z(beta)3.24151555008465
z(alpha) + z(beta)2.92640519249607
Minimum Sample Size (2 sided test)521.920374787405
Minimum Sample Size (1 sided test)427.44316412031







Minimum Sample Size (infinite population)
Population Sizeinfinite
Margin of Error0.05
Confidence0.95
Power0.9
Response Distribution (Proportion)0.15
z(alpha/2) + z(beta)3.24151555008465
z(alpha) + z(beta)2.92640519249607
Minimum Sample Size (2 sided test)535.878576133471
Minimum Sample Size (1 sided test)436.756214884067

\begin{tabular}{lllllllll}
\hline
Minimum Sample Size (infinite population) \tabularnewline
Population Size & infinite \tabularnewline
Margin of Error & 0.05 \tabularnewline
Confidence & 0.95 \tabularnewline
Power & 0.9 \tabularnewline
Response Distribution (Proportion) & 0.15 \tabularnewline
z(alpha/2) + z(beta) & 3.24151555008465 \tabularnewline
z(alpha) + z(beta) & 2.92640519249607 \tabularnewline
Minimum Sample Size (2 sided test) & 535.878576133471 \tabularnewline
Minimum Sample Size (1 sided test) & 436.756214884067 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=195539&T=2

[TABLE]
[ROW][C]Minimum Sample Size (infinite population)[/C][/ROW]
[ROW][C]Population Size[/C][C]infinite[/C][/ROW]
[ROW][C]Margin of Error[/C][C]0.05[/C][/ROW]
[ROW][C]Confidence[/C][C]0.95[/C][/ROW]
[ROW][C]Power[/C][C]0.9[/C][/ROW]
[ROW][C]Response Distribution (Proportion)[/C][C]0.15[/C][/ROW]
[ROW][C]z(alpha/2) + z(beta)[/C][C]3.24151555008465[/C][/ROW]
[ROW][C]z(alpha) + z(beta)[/C][C]2.92640519249607[/C][/ROW]
[ROW][C]Minimum Sample Size (2 sided test)[/C][C]535.878576133471[/C][/ROW]
[ROW][C]Minimum Sample Size (1 sided test)[/C][C]436.756214884067[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=195539&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=195539&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Minimum Sample Size (infinite population)
Population Sizeinfinite
Margin of Error0.05
Confidence0.95
Power0.9
Response Distribution (Proportion)0.15
z(alpha/2) + z(beta)3.24151555008465
z(alpha) + z(beta)2.92640519249607
Minimum Sample Size (2 sided test)535.878576133471
Minimum Sample Size (1 sided test)436.756214884067



Parameters (Session):
par1 = 20000 ; par2 = 0.05 ; par3 = 0.95 ; par4 = 0.15 ; par5 = 0.9 ;
Parameters (R input):
par1 = 20000 ; par2 = 0.05 ; par3 = 0.95 ; par4 = 0.15 ; par5 = 0.9 ;
R code (references can be found in the software module):
par1 <- as.numeric(par1)
par2 <- as.numeric(par2)
par3 <- as.numeric(par3)
par4 <- as.numeric(par4)
par5 <- as.numeric(par5)
(z <- abs(qnorm((1-par3)/2)) + abs(qnorm(1-par5)))
(z1 <- abs(qnorm(1-par3)) + abs(qnorm(1-par5)))
dum <- z*z * par4*(1-par4)
dum1 <- z1*z1 * par4*(1-par4)
par22 <- par2*par2
npop <- array(NA, 200)
ppop <- array(NA, 200)
for (i in 1:200)
{
ppop[i] <- i * 100
npop[i] <- ppop[i] * dum / (dum + (ppop[i]-1)*par22)
}
bitmap(file='pic1.png')
plot(ppop,npop, xlab='population size', ylab='sample size (2 sided test)', main = paste('Confidence',par3))
dumtext <- paste('Margin of error = ',par2)
dumtext <- paste(dumtext,' Response Rate = ')
dumtext <- paste(dumtext, par4)
mtext(dumtext)
grid()
dev.off()
(n <- par1 * dum / (dum + (par1-1)*par22))
(n1 <- par1 * dum1 / (dum1 + (par1-1)*par22))
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Minimum Sample Size',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Population Size',header=TRUE)
a<-table.element(a,par1)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Margin of Error',header=TRUE)
a<-table.element(a,par2)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Confidence',header=TRUE)
a<-table.element(a,par3)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Power',header=TRUE)
a<-table.element(a,par5)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Response Distribution (Proportion)',header=TRUE)
a<-table.element(a,par4)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'z(alpha/2) + z(beta)',header=TRUE)
a<-table.element(a,z)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'z(alpha) + z(beta)',header=TRUE)
a<-table.element(a,z1)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Minimum Sample Size (2 sided test)',header=TRUE)
a<-table.element(a,n)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Minimum Sample Size (1 sided test)',header=TRUE)
a<-table.element(a,n1)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')
(n <- dum / par22)
(n1 <- dum1 / par22)
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Minimum Sample Size (infinite population)',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Population Size',header=TRUE)
a<-table.element(a,'infinite')
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Margin of Error',header=TRUE)
a<-table.element(a,par2)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Confidence',header=TRUE)
a<-table.element(a,par3)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Power',header=TRUE)
a<-table.element(a,par5)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Response Distribution (Proportion)',header=TRUE)
a<-table.element(a,par4)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'z(alpha/2) + z(beta)',header=TRUE)
a<-table.element(a,z)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'z(alpha) + z(beta)',header=TRUE)
a<-table.element(a,z1)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Minimum Sample Size (2 sided test)',header=TRUE)
a<-table.element(a,n)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Minimum Sample Size (1 sided test)',header=TRUE)
a<-table.element(a,n1)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')