Exemplo n.º 1
0
    def cochran(sd, data, rnge):
        z = zScore.zScore(data)
        p = PopulationProportion.proportion(sd, data, rnge)
        e = MarginError.marginError(sd, data)
        q = 1 - p

        cochran = (Exponentiation.sqr(z, 2) * p * q) / Exponentiation.sqr(e, 2)

        return cochran
Exemplo n.º 2
0
    def sampleSize(sd, data, percentage):
        z = zScore.zScore(sd)
        e = MarginError.marginError(sd, data)
        p = percentage
        q = 1 - p
        val = z/e
        sample = Exponentiation.sqr(val, 2) * p * q

        return sample
Exemplo n.º 3
0
 def Exponent(self, a, b):
     self.Result = Exponentiation.sqr(a, b)
     return self.Result