Skip to content

Instantly share code, notes, and snippets.

@aditya0811
Created June 3, 2019 15:18
Show Gist options
  • Save aditya0811/f556ff74178cedd42fd80072f6406e91 to your computer and use it in GitHub Desktop.
Save aditya0811/f556ff74178cedd42fd80072f6406e91 to your computer and use it in GitHub Desktop.
sampleone
from math import sqrt
import numpy as np
a=np.array([27.5, 21.0, 19.0, 23.6, 17.0, 17.9, 16.9, 20.1, 21.9, 22.6, 23.1, 19.6, 19.0, 21.7, 21.4,22,23,32.5,43.4,12.4,23.4])
pop_mean=27.5
num_a=len(a)
test_statistic= (a.mean()-pop_mean)/(a.std()/sqrt(num_a))
print(test_statistic)
>>>-3.855
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment