Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need help writing the code block using information from step 3 to complete step 4 File Edit Not Trusted Python Help + x View Insert
need help writing the code block using information from step 3 to complete step 4
File Edit Not Trusted Python Help + x View Insert Cell Kernel Widgets B W Run C Markdown Number of rows in the dataset = 246 Step 3: Hypothesis Test for the population Mean (0) 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 standard deviation for relative skill level is unknown. Make the following edits to the code block below: 1. Replace ??DATAFRAME_YOUR_TEAM?? with the name of your team's dataframe. See Step 2 for the name of your team's dataframe. 2. Replace ??RELATIVE SKILL?? with the name of the variable for relative skill. See the table included in the Project Two instructions above to pick the variable name. Enclose this variable in single quotes. For example, if the variable name is var2 then replace ??RELATIVE SKILL?? with 'var2. 3. Replace ??NULL_HYPOTHESIS_VALUE?? with the mean value of the relative skill under the null hypothesis. After you are done with your edits, click the block of code below and hit the Run button above. In [7]: import scipy.stats as st # Mean relative skill level of your team mean elo_your team = your team dr['elon'].mean() print("Mean Relative skill of your team in the years 2013 to 2015 -", round (mean_elo_your team, 2)) # Hypothesis Test ---- TODO: make your edits here ---- test_statistic, p_value = st.ttest_isamp (your_team_art'elo n'1,1420) print ("Hypothesis Test for the population Mean") print("Test Statistic-", round (test_statistic, 2)) print("p-value=", round (p_value, 4)) Mean Relative skill of your team in the years 2013 to 2015 - 1617.48 Hypothesis Test for the population Mean Test statistic = 30.99 P-value = 0.0 Step 4: Hypothesis Test for the population Mean (1) nur team has hypothesized that your team scored at an average of team averacina 110 points is likely to do very well during the regular season. The coach of your team has hypothesized that your team DOWNLOAD X C Markdown L + Run Test Statistic = 30.99 P-value = 0.0 Step 4: Hypothesis Test for the Population Mean (11) A team averaging 110 points is likely to do very well during the regular season. The coach of your team has hypothesized that your team scored at an average or less than 110 points in the years 2013-2015. Test this claim at a 1% level of significance. For this test, assume that the population standard deviation for relative skill level is unknown. You are to write this code block yourself. Use Step 3 to help you write this code block. Here is some information that will help you write this code block. Reach out to your instructor if you need help. 1. The dataframe for your team is called your_team_df. 2. The variable 'pts' represents the points scored by your team. 3. Calculate and print the mean points scored by your team during the years you picked. 4. Identify the mean score under the null hypothesis. You only have to identify this value and do not have to print it. (Hint: this is given in the problem statement) 5. Assuming that the population standard deviation is unknown, use Python methods to carry out the hypothesis test. 6. Calculate and print the test statistic rounded to two decimal places. 7. Calculate and print the P-value rounded to four decimal places. Write your code in the code block section below. After you are done, Click this block of code and hit the Run button above. Reach out to your instructor if NA need more help with this step. [ ]: # Write your code in this code block section File Edit Not Trusted Python Help + x View Insert Cell Kernel Widgets B W Run C Markdown Number of rows in the dataset = 246 Step 3: Hypothesis Test for the population Mean (0) 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 standard deviation for relative skill level is unknown. Make the following edits to the code block below: 1. Replace ??DATAFRAME_YOUR_TEAM?? with the name of your team's dataframe. See Step 2 for the name of your team's dataframe. 2. Replace ??RELATIVE SKILL?? with the name of the variable for relative skill. See the table included in the Project Two instructions above to pick the variable name. Enclose this variable in single quotes. For example, if the variable name is var2 then replace ??RELATIVE SKILL?? with 'var2. 3. Replace ??NULL_HYPOTHESIS_VALUE?? with the mean value of the relative skill under the null hypothesis. After you are done with your edits, click the block of code below and hit the Run button above. In [7]: import scipy.stats as st # Mean relative skill level of your team mean elo_your team = your team dr['elon'].mean() print("Mean Relative skill of your team in the years 2013 to 2015 -", round (mean_elo_your team, 2)) # Hypothesis Test ---- TODO: make your edits here ---- test_statistic, p_value = st.ttest_isamp (your_team_art'elo n'1,1420) print ("Hypothesis Test for the population Mean") print("Test Statistic-", round (test_statistic, 2)) print("p-value=", round (p_value, 4)) Mean Relative skill of your team in the years 2013 to 2015 - 1617.48 Hypothesis Test for the population Mean Test statistic = 30.99 P-value = 0.0 Step 4: Hypothesis Test for the population Mean (1) nur team has hypothesized that your team scored at an average of team averacina 110 points is likely to do very well during the regular season. The coach of your team has hypothesized that your team DOWNLOAD X C Markdown L + Run Test Statistic = 30.99 P-value = 0.0 Step 4: Hypothesis Test for the Population Mean (11) A team averaging 110 points is likely to do very well during the regular season. The coach of your team has hypothesized that your team scored at an average or less than 110 points in the years 2013-2015. Test this claim at a 1% level of significance. For this test, assume that the population standard deviation for relative skill level is unknown. You are to write this code block yourself. Use Step 3 to help you write this code block. Here is some information that will help you write this code block. Reach out to your instructor if you need help. 1. The dataframe for your team is called your_team_df. 2. The variable 'pts' represents the points scored by your team. 3. Calculate and print the mean points scored by your team during the years you picked. 4. Identify the mean score under the null hypothesis. You only have to identify this value and do not have to print it. (Hint: this is given in the problem statement) 5. Assuming that the population standard deviation is unknown, use Python methods to carry out the hypothesis test. 6. Calculate and print the test statistic rounded to two decimal places. 7. Calculate and print the P-value rounded to four decimal places. Write your code in the code block section below. After you are done, Click this block of code and hit the Run button above. Reach out to your instructor if NA need more help with this step. [ ]: # Write your code in this code blockStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started