Does regression work on data that isn't normally distributed? 
I'm trying to see if variables x and y together or separately significantly affect Q_7 (the histogram for which is above). I've run a Shapiro-Wilk normality test and got the following
shapiro.test(Q_7)
## data:  Q_7
## W = 0.68439, p-value < 2.2e-16

With this distribution, will the following regression work? Or is there another test I should be doing? 
lm(Q_7 ~ x*y)

 A: The short answer is yes.
First of all (as is pointed out by Ruben van Bergen), the distribution of $y$ (or $X$, for that matter) is not relevant. If you were to make a distributional assumption, it would be on your residuals $\varepsilon$, so that is what you should check.
But more importantly, you don't need the normality assumption at all for your estimation to work. You are using R's lm function, which estimates your model using ordinary least squares (OLS). That method will give you a correct estimation of the expectation of $Y$ conditional on $X$ as long as:


*

*$\mathbb{E}[\varepsilon|X] = 0$ (there is no external factor affecting both your outcome and your explanatory variables).

*$\mathrm{Var}(\varepsilon) < \infty$ (your residuals have finite variance).


If you further make the assumption that you residuals are uncorrelated and that they all have the same variance, then the Gauss-Markov theorem applies and the OLS is the best linear unbiased estimator (BLUE).
If your residuals are correlated or have different variances, then OLS still works but it can be less precise, which must be reflected in the way you report the confidence intervals of your estimates (using, say robust standard errors).
If you also make the assumption that your residuals are normally distributed, then OLS becomes asymptotically efficient because it is equivalent to maximum likelihood.
So the regression may work better if your data are normally distributed, but it will still work if they aren't.
A: A regression analysis assumes that the data is normally distributed conditioned on the variables in the regression model. That is, if this is the regression model:
$$y=X\beta+\varepsilon$$
where $X$ is your matrix of regressor variables, $y$ is the (vector of) data to be explained, $\beta$ is a vector of coefficients on the regressors and $\varepsilon$ is random variability (typically considered noise), then the assumption of Normality applies strictly to $\varepsilon$, not to $y$ (edit: well, strictly speaking it applies to the conditional distribution $y|X$ (which is the same as the distribution of $\varepsilon$), but not to the marginal distribution of $y$). In other words, the data should be Normally distributed once the effects of the regressors have been accounted for, but not (necessarily) before.
What you're testing here is the distribution of $y$, where what you want to test is the distribution of $\varepsilon$. Of course you don't know $\varepsilon$, but you can estimate it by running the regression and examining the distrbution of the residuals $\hat\varepsilon=y-X\hat\beta $ (where $\hat\beta$ are the estimated coefficents from the regression). These residuals $\hat\varepsilon$ are an estimate of $\varepsilon$, and so their distribution will be an approximation of the distribution of $\varepsilon$.
