Safety precautions needed?
A store is trying to determine if they need to upgrade their safety protocol based on the number of buyers they expect to have on Black Friday 2023, the biggest sales event of the year. Their maximum occupancy limit is 250. Every year on Black Friday, this store surveys each buyer to rate their shopping experience and you happen to get your hands on the data.
The survey dataset, foot_traffic
, has been cleaned and loaded for you. It consists of columns: year
, visitors
, and average_experience_rating
.
The statsmodels.api
package has been imported as sm
, along with matplotlib.pyplot
as plt
, pandas
as pd
, and numpy
as np
.
Este exercício faz parte do curso
Analyzing Survey Data in Python
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Define variable, x and y
x = foot_traffic.____.____
y = foot_traffic.____.____
# Add the constant term
x = ____.____(x)
# Perform .OLS() regression and fit
result = ____.____(y,x).____()
# Print the summary table
print(____.____())