One Population Proportion
Research Question: In previous years 52% of parents believed that electronics and social media was the cause of their teenager’s lack of sleep. Do more parents today believe that their teenager’s lack of sleep is caused due to electronics and social media?
Population: Parents with a teenager (age 13-18) Parameter of Interest: p Null Hypothesis: p = 0.52 Alternative Hypthesis: p > 0.52 (note that this is a one-sided test)
1018 Parents
56% believe that their teenager’s lack of sleep is caused due to electronics and social media
this is a one tailed test and according to the professor the p-value should be 0.0053, but when i calculate the p-value for z-statistic=2.5545334262132955 in python :
p_value=stats.distributions.norm.cdf(1-z_statistic)
this code gives 0.06 as output
i know that
stats.distributions.norm.cdf
gives the probability to the left hand side of the statistic but the above code is giving wrong p value
but when I type :
stats.distributions.norm.cdf(-z_statistic)
it gives output as 0.0053,
how is this possible,please help!!!