Question

Hello, Suppose the management claims that the proportion of games that your team wins when scoring...

Hello,

Suppose the management claims that the proportion of games that your team wins when scoring 80 or more points is 0.50. Test this claim using a 5% level of significance. Make the following edits to the code block below:

Question: Replace ??NULL_HYPOTHESIS_VALUE?? with the proportion under the null hypothesis.
Options: Do I need to replace the above variable with a value of 80, 0.50 or 0.05 ??

------------------------------------------------------------------------------------------------------------------------------------------------

from statsmodels.stats.proportion import proportions_ztest

your_team_gt_80_df = your_team_df[(your_team_df['pts'] > 80)]

# Number of games won when your team scores over 80 points
counts = (your_team_gt_80_df['game_result'] == 'W').sum()

# Total number of games when your team scores over 80 points
nobs = len(your_team_gt_80_df['game_result'])

p = counts*1.0/nobs
print("Proportion of games won by your team when scoring more than 80 points in the years 2013 to 2015 =", round(p,4))


# Hypothesis Test
# ---- TODO: make your edits here ----
test_statistic, p_value = proportions_ztest(counts, nobs, ??NULL_HYPOTHESIS_VALUE??)

print("Hypothesis Test for the Population Proportion")
print("Test Statistic =", round(test_statistic,2))
print("P-value =", round(p_value,4))

After you are done with your edits, click the block of code below and hit the Run button above.

Homework Answers

Answer #1

Question: Replace ??NULL_HYPOTHESIS_VALUE?? with the proportion under the null hypothesis.
Options: Do I need to replace the above variable with a value of 80, 0.50 or 0.05 ??

------------------------------------------------------------------------------------------------------------------------------------------------

You need to replace the above variable with a value of 0.50

Explanation:

The claim is: The proportion of games that your team wins when scoring 80 or more points is 0.50.

So,

H0:Null Hypothesis: p = 0.50 (The proportion of games that your team wins when scoring 80 or more points is 0.50) (Claim)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
I keep getting error working on my project 2 MAT 243. What am I doing wrong?...
I keep getting error working on my project 2 MAT 243. What am I doing wrong? Step 3: Hypothesis Test for the Population Mean (I) A relative skill level of 1420 represents a critically low skill level in the league. The management of your team has hypothesized that the average relative skill level of your team in the years 2013-2015 is greater than 1420. Test this claim using a 5% level of significance. For this test, assume that the population...
When games were sampled from throughout a season, it was found that the home team won...
When games were sampled from throughout a season, it was found that the home team won 127 of 198 professional basketball games and the home team won 57 of 99 professional football games. At the 5% level of significance, does this indicate that there is a significant difference between the proportion of home games won by the two sports? (1) List all the information necessary for conducting the hypothesis test and state which test you are doing. (2) State the...
A sports writer for the LA Times asserts that the proportion of games won by the...
A sports writer for the LA Times asserts that the proportion of games won by the Lakers over the past 40 years is 72%. You want to test if the proportion of won games may be different than the value the writer has claimed. You gather the results for a random sample of 80 games played by the Lakers within the past 40 years. Please actually solve all parts. (a) What are the null and alternative hypotheses for this experiment?...
When games were sampled throughout a​ season, it was found that the home team won 116...
When games were sampled throughout a​ season, it was found that the home team won 116 of 153 baseball ​games, and the home team won 59 of 66 hockey games. The result from testing the claim of equal proportions are shown on the right. Does there appear to be a significant difference between the proportions of home​ wins? What do you conclude about the home field​ advantage? ​2-proportion test p 1 not equals p 2 z equals negative 2.30089323 p...
When games were sampled throughout a? season, it was found that the home team won 113...
When games were sampled throughout a? season, it was found that the home team won 113 of 164 field hockey ?games, and the home team won 53 of 92 hockey games. The result from testing the claim of equal proportions are shown on the right. Does there appear to be a significant difference between the proportions of home? wins? What do you conclude about the home field? advantage? ?2-proportion test p 1 not equals p 2 z equals 1.81592721 p...