Get startedGet started for free

Exploring WNBA Data

In this chapter, you will work with a matrix-vector model for team strength in the Women's National Basketball Association (WNBA) at the conclusion of the 2017 season. These team strengths can be used to predict who will win a match between any two teams, for example, using machine learning.

The WNBA has 12 teams, so your Massey Matrix \(M\) will be 12x12, and will initially be loaded as a data frame. The vector with the point differentials for each team will be a vector with 12 elements.

This exercise is part of the course

Linear Algebra for Data Science in R

View Course

Exercise instructions

  • The Massey matrix M is loaded for you. Print M.
  • The strength vector f is loaded for you. Print f.
  • Using the sum() command, show that the sum of the first column of M is zero (this is true of every column).
  • Find the sum of the vector f. Why should this be zero as well?

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Print the Massey Matrix M
___(___)

# Print the vector of point differentials f 
___

# Find the sum of the first column of M
___(___)

# Find the sum of the vector f
sum(___)
Edit and Run Code