You must write the code in Python. Use the information in the picture to help your code along with the information below   Write a code based on this problem : A team averaging 106 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 of less than 106 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.   here is some information to help your code. The dataframe for your team is called your_team_df. The variable 'pts' represents the points scored by your team. Calculate and print the mean points scored by your team during the years you picked. 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) Assuming that the population standard deviation is unknown, use Python methods to carry out the hypothesis test. Calculate and print the test statistic rounded to two decimal places. Calculate and print the P-value rounded to four decimal places.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

You must write the code in Python. Use the information in the picture to help your code along with the information below

 

Write a code based on this problem : A team averaging 106 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 of less than 106 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.

 

here is some information to help your code.

  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.
Step 3: Hypothesis Test for the Population Mean (1)
A relative skill level of 1340 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 1340. 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.
import scipy.stats as st
# Mean relative skill Level of your team
mean_elo_your_team = your_team_df['elo_n'].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_1samp(your_team_df['elo_n'], 1348)
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 = 1489.87
Hypothesis Test for the Population Mean
Test Statistic = 51.95
P-value = 0.0
Transcribed Image Text:Step 3: Hypothesis Test for the Population Mean (1) A relative skill level of 1340 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 1340. 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. import scipy.stats as st # Mean relative skill Level of your team mean_elo_your_team = your_team_df['elo_n'].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_1samp(your_team_df['elo_n'], 1348) 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 = 1489.87 Hypothesis Test for the Population Mean Test Statistic = 51.95 P-value = 0.0
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Top down approach design
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education