Exemple #1
0
def test_calc_varianceSampleProportion_fail():
    from StatisticsModule import varianceSampleProportion
    assert varianceSampleProportion(testData) != 2
Exemple #2
0
print('Select operation!')
print('1.Population Standard Deviation')
print('2.Variance of Population Proportion')
print('3.Calculate Z-Score for each Number')
print('4.Sample Standard Deviation')
print('5.Variance of Sample Proportion')

choice = input('Enter choice:')

if choice == "1":
    from StatisticsModule import populationStandardDeviation
    print('Standard Deviation - Population: ',
          str(populationStandardDeviation(dataSet)))
elif choice == "2":
    from StatisticsModule import variancePopulationProportion
    print('variance- Population: ', str(variancePopulationProportion(dataSet)))
elif choice == "3":
    from StatisticsModule import zScore
    print('z-score: ', str(zScore(dataSet)))
elif choice == "4":
    from StatisticsModule import standardDeviation
    print('standard deviation: ', str(standardDeviation(dataSet)))
elif choice == "5":
    from StatisticsModule import varianceSampleProportion
    print('Variance Sample Proportion: ',
          str(varianceSampleProportion(dataSet)))
else:
    print(
        "(•̀ᴗ•́ )(•̀ᴗ•́ )(•̀ᴗ•́ ) something went wrong (•̀ᴗ•́ )(•̀ᴗ•́ )(•̀ᴗ•́ )"
    )
    print('Population Standard Deviation: ', str(populationStandardDeviation(dataSet)))
elif choice == "5":
    from StatisticsModule import variancePopulationProportion
    print('variance of population proportion: ', str(variancePopulationProportion(dataSet)))    
elif choice == "6":
    from StatisticsModule import zScore
    print('z-score: ', str(zScore(dataSet)))
elif choice == "7":
    from StatisticsModule import standardizedScore
    print('Standardized Score: ', str(standardizedScore(dataSet)))
elif choice == "8":
    from StatisticsModule import populationCorrelationCoefficient
    print('Population Correlation Coefficient: ', str(populationCorrelationCoefficient(dataSet)))
elif choice == "9":
    from StatisticsModule import confidenceInterval
    print('confidence interval: ', str(confidenceInterval(dataSet)))    
elif choice == "10":
    from StatisticsModule import variance
    print('variance: ', str(variance(dataSet)))
elif choice == "12":
    from StatisticsModule import varianceSampleProportion
    print('Variance Sample Proportion: ', str(varianceSampleProportion(dataSet)))
elif choice == "13":
    from StatisticsModule import sampleMean
    print('sample mean: ', str(sampleMean(dataSet)))    
elif choice == "14":
    from StatisticsModule import standardDeviation
    print('standard deviation: ', str(standardDeviation(dataSet)))    
else:
    print("(•̀ᴗ•́ )(•̀ᴗ•́ )(•̀ᴗ•́ ) something went wrong (•̀ᴗ•́ )(•̀ᴗ•́ )(•̀ᴗ•́ )")