LoslegenKostenlos loslegen

Linear predictions

Businesses are particularly interested in regressions due to their ability to predict the outcome of a dependent variable given values of an independent variable, either based on a particular A/B group or ignoring the groups.

A company is interested in assessing the impact that the amount of time spent searching on the site has on the amount of money spent on their site. You have created a linear model ignoring groups, spending and ensured the linear regression assumptions have been met. The company is interested in how much money is likely to be spent given 30, 32, or 40 minutes are spent on the website regardless of groups.

The SiteSales dataset and spending linear regression model have been loaded for you.

Diese Übung ist Teil des Kurses

A/B Testing in R

Kurs anzeigen

Anleitung zur Übung

  • Store the time we are interested in predicting, 30, 32, and 40 minutes in a a variable called TimeSearching.
  • Store the time in a data frame called timepredict.
  • Determine the amount likely to be spent given the time points we are interested in and the spending model.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Store the data to predict
TimeSearching <- c(___)

# Store the data in a data frame
timepredict <-  data.frame(___)

# Determine the amount expected to spend
predict(___, newdata = ___)
Code bearbeiten und ausführen