3. SENTIMENTCORRELATION
Similarity of sentiments between two demographic groups is measured using a correlation coefficient of their sentiment time series.
Definition8. (Sentiment Correlation) Correlation l of two time series s and s" of length n (with averages s and s") is defined as the normalized inner product (s◦s") n 1 of local deviations from averages:
Indices n 1 in the inner product denote that it is computed using data points from 1 to n. Correlation l takes values in the interval[-1,1], where a positive (resp., negative) sign indicates that sentiments are changing in the same(resp., opposite) way and the absolute value measures the strength of the correlation. Sentiment average can be computed in different ways in order to reflect different dependencies between time series. In addition, the period of time during which correlation is computed may vary depending on whether the whole period is considered at once or if it is processed into sub-intervals. In the next two sub-sections we discuss different sentiment average computation and interval processing. We use the examples in Figure2.