Power and Sample Size for Two Sample Tests on Proportions

Below is a video tutorial for calculating Power and Sample Size for Two Sample Tests on Proportions.  Und the video is the code used in the video.



#####################################################
###
###  Determining Power and Sample Size for testing Two 
###  Population Proportions
###
######################################################

######################################################
###  Finding the power
###
###  Sample size   n = 174
###  Proportion1  prop1 = 0.73
###  Proportion2  prop2 = 0.64

power.prop.test( n = 174,
                 p1 = 0.73,
                 p2 = 0.64
                )

######################################################
###  Finding the Sample Size
###
###  Power power = 0.9
###  Proportion1   prop1 = 0.73
###  Proportion2   prop2 = 0.64

power.prop.test( power = 0.9,
                 p1 = 0.73,
                 p2 = 0.64
                )

No comments:

Post a Comment