FunctionRacerProblemsRace

Is the Share Different

EasystatsmodelsPython

In a poll, count of n people said yes. Return the p-value of the two-sided z-test of whether the true share of yes differs from share.

Example 1

count 50
n 100
share 0.5
returns 1.0

Exactly half said yes, which is just what a share of 0.5 predicts.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More statsmodels problems