5. Scatterplot and Correlation for the Total Number of Wins and Average Points Scored You constructed a scatterplot of total number of wins and average
5. Scatterplot and Correlation for the Total Number of Wins and Average Points Scored
You constructed a scatterplot of total number of wins and average points scored. You also calculated the Pearson correlation coefficient along with its P-value.
See Step 4 in the Python script to answer the following questions:
In this activity, you generated a scatterplot of the total number of wins and average points scored. Include a screenshot of this plot in your report.
What do the scatterplot and the Pearson correlation coefficient tell you about the association between total number of wins and average points scored?
Is the correlation coefficient statistically significant based on the P-value? Use a 1% level of significance.
Chrome File Edit View History Bookmarks Profiles Tab Window Help 83% O Sat 8:30 PM Q IE Homework Help - Q&A from Or x CCodio - NEW MAT-243 Project X D21 Homepage - Southern New Ha X + C A codio.combattenew-mat-243-project-three 0 N Codio Project File Edit Find View Tools Education Help Configure. @ Project Index (static) Configure.. NBATTEN C Filetree README.md Project Three... x NBATTEN jupyter Project Three Jupyter Script Last Checkpoint: Last Thursday at 1 1:34 AM (autosaved) NEW MAT-243 Proje File Edit View Insert Cell Kernel Widgets Help Trusted |Python 3 O + + Run C |Markdown A NEW MAT-243 Project Three (mr ipynb_checkpoints Step 4: Scatterplot and Correlation for the Total Number of Wins and BACKUP_Project Three Jupyt Average Points Scored nba_wins_data.csv Your coach expects teams to win more games in a regular season if they score more points on average during the season. notebook.tex This is because the chances of winning are higher if a team maintains high average points scored. Therefore, it is expected Project Three Jupyter Script.i that the total number of wins and the average points scored are correlated. Calculate the Pearson correlation coefficient and README.md its P-value. Make the following edits to the code block below: 1. Replace ??DATAFRAME_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 ??POINTS?? with the name of the variable for average points scored in a regular season. 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 ??POINTS?? with 'var1' 3. Replace ??WINS?? 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 points scored in a regular season. After you are done with your edits, click the block of code below and hit the Run button above. In [4]: import scipy . stats as st 100% (2:1) 13 4 XChrome File Edit View History Bookmarks Profiles Tab Window Help 83% Sat 8:30 PM Q IE Homework Help - Q&A from Or x CCodio - NEW MAT-243 Project X D21 Homepage - Southern New Ha X + C A codio.combattenew-mat-243-project-three 0 N Codio Project File Edit Find View Tools Education Help Configure. @ Project Index (static) Configure.. NBATTEN C Filetree README.md Project Three... x NBATTEN jupyter Project Three Jupyter Script Last Checkpoint: Last Thursday at 11:34 AM (autosaved) NEW MAT-243 Proje File Edit View Insert Cell Kernel Widgets Help Trusted |Python 3 O + + H Run C Markdown A NEW MAT-243 Project Three (mr ipynb_checkpoints In [4]: import scipy . stats as st BACKUP_Project Three Jupyt # ---- TODO: make your edits here ---- nba_wins_data.csv pit. plot (nba_wins_df [ 'avg_pts' ], nba_wins_df[ 'total_wins' ], 'o' ) notebook.tex Project Three Jupyter Script.i # nba_wins_df. rename( columns = {'avg_pts': 'POINTS'), inplace = True) README.md # x points = nba_wins_df[ 'POINTS' ] pit. title( 'Total Number of Wins by Average Points Scored', fontsize=20) pit. xlabel ( ' Average Points Scored' ) pit. ylabel ( 'Total Number of Wins' ) pit. show ( ) # ---- TODO: make your edits here ---- correlation_coefficient, p_value = st. pearsonr (nba_wins_df['avg_pts' ], nba_wins_df[ ' total_wins # correlation_coefficient, pvalue = st. pearsonr(x_points, y) print ( "Correlation between Average Points Scored and the Total Number of Wins ") print( "Pearson Correlation Coefficient =", round(correlation_coefficient,4) ) print( "P-value =", round(p_value, 4) ) VIIIL JUVIC 70 60 100% (2:1) 13 OAC -WChrome File Edit View History Bookmarks Profiles Tab Window Help 83% Sat 8:30 PM Q IE Homework Help - Q&A from Or x CCodio - NEW MAT-243 Project X D21 Homepage - Southern New Ha X + C A codio.combattenew-mat-243-project-three 0 N Codio Project File Edit Find View Tools Education Help Configure. @ Project Index (static) Configure.. NBATTEN C Filetree README.md Project Three... x NBATTEN jupyter Project Three Jupyter Script Last Checkpoint: Last Thursday at 1 1:34 AM (autosaved) NEW MAT-243 Proje File Edit View Insert Cell Kernel Widgets Help Trusted |Python 3 O + Run C Markdown A NEW MAT-243 Project Three (m print( "Correlation between Average Points Scored and the Total Number of Wins ") ipynb_checkpoints print( "Pearson Correlation Coefficient =", round (correlation_coefficient, 4) ) BACKUP_Project Three Jupyt print ( "P-value =", round(p_value, 4) ) nba_wins_data.csv notebook.tex Total Number of Wins by Average Points Scored Project Three Jupyter Script.i README.md 70 60 50 Total Number of Wins 40 30 20 10 90 95 100 105 110 Average Points Scored Correlation between Average Points Scored and the Total Number of Wins Pearson Correlation Coefficient = 0.4777 Ston 5: Multiple Regression: Predicting the Total Number of Wins using 100% (2:1) 13Chrome File Edit View History Bookmarks Profiles Tab Window Help 83% Sat 8:30 PM Q IE Homework Help - Q&A from Or x CCodio - NEW MAT-243 Project X D21 Homepage - Southern New Ha X + C A codio.combattenew-mat-243-project-three 0 N Codio Project File Edit Find View Tools Education Help Configure. @ Project Index (static) Configure.. NBATTEN C Filetree README.md Project Three... x NBATTEN jupyter Project Three Jupyter Script Last Checkpoint: Last Thursday at 1 1:34 AM (autosaved) NEW MAT-243 Proje File Edit View Insert Cell Kernel Widgets Help Trusted |Python 3 O + Run C Markdown A NEW MAT-243 Project Three (m print ( "Correlation between Average Points Scored and the Total Number of Wins ") ipynb_checkpoints print ( "Pearson Correlation Coefficient =", round (correlation_coefficient, 4) ) BACKUP_Project Three Jupyt print( "P-value =", round(p_value, 4) ) nba_wins_data.csv TULUI TUTTIVER notebook.tex 70 Project Three Jupyter Script.i README.md 60 50 40 Total Number of Wins 30 20 10 85 90 95 100 105 110 Average Points Scored Correlation between Average Points Scored and the Total Number of Wins Pearson Correlation Coefficient = 0.4777 P-value = 0.0 Ston 5: Multiple Regression: Predicting the Total Number of Wins using 100% (2:1) 13 -W
Step 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