A/B tests vs. multivariable experiments
The point of an A/B test is that only one thing is changed and the effect of that change is measured. We saw this with our examples in the video and the last few exercises. On the other hand, a multivariate experiment, such as the ToothGrowth
experiment from chapter 1, is where a few things are changed (and is similar to a multiple factor experiment, which we covered earlier in this chapter.)
A Lending Club multivariate test can combine all of the explanatory variables we've looked at in this chapter. Let's examine how Group
, grade
, and verification_status
affect loan_amnt
in the lendingclub_ab
dataset.
This exercise is part of the course
Experimental Design in R
Exercise instructions
- Use
lm()
to examine the effect of all three explanatory variables onloan_amnt
. Save as a model object calledlendingclub_multi
. - Examine
lendingclub_multi
withtidy()
and draw your conclusions.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Build lendingclub_multi
___ <-___(___, ___)
# Examine lendingclub_multi results
___