# What is the effect of having skewed dependent variable on scatterplot result

The histogram of my dependent variable is as following:

I draw the scatter plot of my dependent variable and independent variable, and the result is as following picture? I am wondering if the skewness of the dependent variable may affect the result. It seems that the relationship is not linear and we have a lot of outliers!

• You are not explaining how your wiggly curves were derived. At a guess, your green line is a linear regression, which looks like a bad idea. The downward turns are not very convincing and seem to be governed largely by #132. Do you have any independent grounds for suspecting a turning point? Take logarithms of both variables if you can: I'd trust a power function more than any of your smooths or fits. – Nick Cox Sep 4 '14 at 23:21
• Yes, the green line is linear regression and the red one is smoothed with lowess. – PSS Sep 4 '14 at 23:49

This means that your estimates of Sales as a function of Mvisits are more accurate for low values of Sales. You can see that reflected in the confidence bands around the smoothing regression (the red curvy line), which are relatively narrow for average Sales $\le$ 30, but widening quite a bit thereafter.

Of course the histogram of Mvisits is also skewed to the right, so taken together this means your data are giving you a reliable idea about how these two variables relate only for low values of each.

It's important to be clear on the difference between the marginal distribution of $y$ and the conditional distribution. It's perfectly possible for $y$ to be skew, but $y|x$ to be normal (say) --- but the assumption is not about $y$, it's about $y|x$.

So skewness in $y$ is not of itself any particular cause for concern. It may not imply anything, and even if it is also associated with some skewness in the conditional distribution, that may not so badly impact your estimation* (though it might affect some of your inference, especially if sample sizes are smallish; at large sample sizes even this concern goes away).

* The least squares line will still be best linear unbiased, for example, so as long as it's not so skew that linear estimators as a class become too poor to be tenable, the best of them should do quite okay.

Of much more concern:

1) your display indicates strong heteroskedasticity. This will impact your inference (CIs and tests) no matter how big your sample size is.

2) Clear hints of nonlinearity. In particular, (looking at the points only, since I think the smooth didn't work well because of other issues) the relationship seems to rapidly increasing at small $x$ (up to about 1500 say) but almost flat after that.

3) your x-variable has an influential outlier (or potentially influential point which might be an outlier, depending on what is done about the heteroskedasticity and how the nonlinearity is modelled).

I'd suggest looking at a transformed $y$ in your plot, not so much because of the skewness in the marginal distribution, but to reduce the impact of (1), so that the issues with (2) and (3) can be investigated in more detail.

You might consider looking at one or both of (i) log y vs x, and (ii) log y vs log x (the latter may be slightly more helpful). I expect neither will be linear, but they might help guide you toward choosing a suitable model for both the relationship between the variables and for the conditional distribution of $y$ (most especially, in relation to its variance).

• Thank you very much for your complete answer. do you know how could I write the code for drawing a plot to show conditional distribution of Y|X in R? I would be very thankful if you help. – PSS Sep 6 '14 at 2:56