Пример #1
0
def test_calc_median_fail():
    from StatisticsModule import median
    assert median(testData) != 1
print('7.Calculate Standardized score for each number')
print('8.Calculate Population Correlation Coefficient')
print('9.Confidence Interval')
print('10.Calculate Population Variance')
print('12.Variance Sample Proportion')
print('13.Sample Mean')
print('14.Standard Deviation')

choice = input('Enter choice:')

if choice == "1":
    from StatisticsModule import populationMean
    print('population mean: ', str(populationMean(dataSet)))
elif choice == "2":
    from StatisticsModule import median
    print('median: ', str(median(dataSet)))
elif choice =="3":
    from StatisticsModule import mode
    print('mode(s): ', str(mode(dataSet)))
elif choice =="4":
    from StatisticsModule import populationStandardDeviation
    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)))