## Chap 7 Relationships between variables

### Visualization

In most cases, the simplest way to check a relationship between two variables is scatter plot（散点图）.
To get better visual effect, usually we could use jittering to reverse the effect of rounding off. To handle the problem of too much overlapping points, we can set the parameter of alpha to less than 1.0.

However, when the dataset is bigger, hexbin may be a better choice to show the relationship.

In addition to scatter plot, bin one variable and plot percentiles of the others is also a good option.
Here is the code for bining data（数据装箱）:

EWMA (expontially-weighted moving average):
the most recent value has the highest weight and the weights for previous values drop off exponentially.

ewma = pandas.ewma(data, span=k)