Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is a copy of the code that i wrote for part 9 on this paper. print(Confidence Interval for Average Relative Skill in the years

this is a copy of the code that i wrote for part 9 on this paper.

print("Confidence Interval for Average Relative Skill in the years 1996 to 1998")

print("------------------------------------------------------------------------------------------------------------")

# Mean relative skill of all teams from the years 1996-1998mean = assigned_years_league_df['elo_n'].mean()

mean = assigned_team_df['elo_n'].mean()

# Standard deviation of the relative skill of all teams from the years 1996-1998

stdev = assigned_years_league_df['elo_n'].std()

n = len(assigned_years_league_df)

#Confidence interval

# ---- TODO: make your edits here ----

stderr = stdev/(n ** 0.5)

conf_int_95 = st.norm.interval(0.95, mean, stderr)

print("95% confidence interval (unrounded) for Average Relative Skill (ELO) in the years 1996 to 1998 =", conf_int_95)

print("95% confidence interval (rounded) for Average Relative Skill (ELO) in the years 1996 to 1998 = (", round(conf_int_95[0], 2),",",

round(conf_int_95[1], 2),")")

print(" ")

print("Probability a team has Average Relative Skill LESS than the Average Relative Skill (ELO) of Bulls in the years 1996 to 1998")

mean_elo_assigned_team_df = assigned_team_df['elo_n'].mean()

answer1 = st.norm.cdf(mean_elo_assigned_team, mean, stdev)

# Pick the correct answer.

print("Answer =", round(answer1,4))

. The error that i receive is NameError Traceback (most recent call last) input-22-63a3f815e2a3> in <module> 4 5 # Mean relative skill of all teams from the years 1996-1998mean = assigned_years_league_df['elo_n'].mean() ----> 6 mean = assigned_team_df['elo_n'].mean() 7 8 # Standard deviation of the relative skill of all teams from the years 1996-1998 NameError: name 'assigned_team_df' is not defined 

How do i fix this issuejQuery22403381902044801808_1618790806128?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Performance Analysis And Synthesis For Discrete-Time Stochastic Systems With Network-Enhanced Complexities

Authors: Derui Ding, Zidong Wang, Guoliang Wei

1st Edition

0429880022, 9780429880025

More Books

Students also viewed these Mathematics questions