I have a population that has an average weight of 5 lbs. I've taken sample of 5879 observations from the population. The sample has a total weight of 410522 lbs. I'm trying to figure out if the sample has a significantly higher average weight than the population. Assuming that the population has a normal distribution. I'm trying to use the proportions_ztest from stats model. I'm not sure if I'm using the counts and nobs variables correctly. Can someone please tell me if I'm using the function correctly, or suggest another function? I'm trying to get the p-value.
code:
import statsmodels.api as sm
cnt=410522
nbs=58759
vL=5
sm.stats.proportions_ztest(cnt,
nbs,
vL,
alternative='larger')[1]