Question: I need help with the script In [ ]: Step 2: Scatterplot and Correlation for the Total Number of Wins and Average Relative Skill Your

I need help with the script

I need help with the script In [ ]: Step 2:
In [ ]: Step 2: Scatterplot and Correlation for the Total Number of Wins and Average Relative Skill Your coach expects teams to win more games in a regular season if they have a higher average relative skill compared to their opponents. This is because the chances of winning are higher if a team can maintain high average relative skill. Therefore, it is expected that the total number of wins and the average relative skill are correlated. Calculate the Pearson correlation coefficient and its P-value. Make the following edits to the code block below: 1. Replace ??7DATAFRAME_NAME?? with the name of the dataframe used in this project. See Step 1 for the name of dataframe used in this project. 2. Replace ??RELATIVE_SKILL?? with the name of the variable for average relative skill. See the table included in the Project Three instructions above to pick the variable name. Enclose this variable in single quotes. For example, if the variable name is vari then replace ??7RELATIVE_SKILL?? with 'var1". 3. Replace ??WIN$?? with the name of the variable for the total number of wins in a regular season. Remember to enclose the variable in single quotes. See the table included in the Project Three instructions above to pick the variable name. Enclose this variable in single quotes. For example, if the variable name is var2 then replace ??WINS?? with 'var2". The code block below will print a scatterplot of the total number of wins against the average relative skill. After you are done with your edits, click the block of code below and hit the Run button above. bh import scipy.stats as st # ---- TODO: make your edits here ---- plt.plot(??DATAFRAME_NAME??[df],'r'[??WINS??], 'o') plt.title('Total Number of Wins by Average Relative Skill', fontsize=2@) plt.xlabel('Average Relative Skill") plt.ylabel('Total Number of Wins") plt.show() # ---- TODO: make your edits here ---- correlation_coefficient, p_value = st.pearsonr(??DATAFRAME_NAME??[??RELATIVE_SKILL??], ??DATAFRAME_NAME??[??WINS??]) print("Correlation between Average Relative Skill and the Total Number of Wins ") print("Pearson Correlation Coefficient =", round(correlation_coefficient,4)) 0 print("P-value =", round(p_value,4))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!