ComenzarEmpieza gratis

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 ejercicio forma parte del curso

Analyzing Survey Data in Python

Ver curso

Ejercicio interactivo práctico

Prueba este ejercicio completando el código de muestra.

# 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(____.____())
Editar y ejecutar código