{"id":"pearson_similarity","title":"Pearson correlation","family":"lock-step","definition":"reference","intro_en":"Pearson correlation measures linear co-variation of aligned observations after centering both vectors. The animation reveals each centered-product contribution and normalizes by the full centered norms. Positive correlation, anticorrelation and weak linear association remain different outcomes; a distance card applies the explicit one-minus transform to the same coefficient.","intro_zh":"Pearson 相关衡量对齐观测去均值后的线性协同变化。动图逐项展示中心化乘积，再用完整中心化向量的范数归一化。正相关、负相关和弱线性关系具有不同含义；距离条目显式使用 1 减相关系数。","steps_en":["Pair observations at the same sample index.","Subtract the mean from each series independently.","Sum centered products and divide by centered vector norms.","Read the signed agreement coefficient."],"steps_zh":["按相同采样位置配对观测。","分别减去各自均值。","累加中心化乘积并按范数归一化。","读取相关系数或其 1 减变换。"],"formula":"corr(x,y)","caveats_en":["Constant inputs have undefined statistical correlation; zero-return conventions are software-specific.","Correlation describes linear dependence, not matching units or causal influence.","1-r is a dissimilarity and generally fails the triangle inequality."],"caveats_zh":["常量输入的统计相关未定义；返回零属于软件约定。","相关描述线性依赖，不代表单位相同或因果作用。","1−r 属于差异量，一般不满足三角不等式。"],"sources":[{"label":"SciPy: correlation","url":"https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.correlation.html"}],"x":[1.0,2.0,2.0,4.0,3.0,5.0,5.0,7.0,8.0,6.0,9.0,10.0],"y":[1.0,1.8,2.2,3.4,2.7,4.1,4.1,6.4,6.1,5.5,8.0,9.2],"input_label":"Deterministic synthetic illustration; sample index is the time axis.","parameters":{"centering":true,"ranking":false,"tie_rule":"not applicable"},"result":{"label":"similarity","value":0.9891655312952994,"detail":""},"frames":[{"phase":0,"caption":"Compare paired observations on the same time grid","panel":{"kind":"scatter","title":"Paired observations: x versus y","a":[1.0,2.0,2.0],"b":[1.0,1.8,2.2],"marker":2}},{"phase":0,"caption":"Compare paired observations on the same time grid","panel":{"kind":"scatter","title":"Paired observations: x versus y","a":[1.0,2.0,2.0,4.0,3.0,5.0],"b":[1.0,1.8,2.2,3.4,2.7,4.1],"marker":5}},{"phase":0,"caption":"Compare paired observations on the same time grid","panel":{"kind":"scatter","title":"Paired observations: x versus y","a":[1.0,2.0,2.0,4.0,3.0,5.0,5.0,7.0,8.0],"b":[1.0,1.8,2.2,3.4,2.7,4.1,4.1,6.4,6.1],"marker":8}},{"phase":0,"caption":"Compare paired observations on the same time grid","panel":{"kind":"scatter","title":"Paired observations: x versus y","a":[1.0,2.0,2.0,4.0,3.0,5.0,5.0,7.0,8.0,6.0,9.0,10.0],"b":[1.0,1.8,2.2,3.4,2.7,4.1,4.1,6.4,6.1,5.5,8.0,9.2],"marker":11}},{"phase":1,"caption":"Center each vector","panel":{"kind":"lines","title":"Centered coordinates","a":[-4.166666666666667,-3.166666666666667,-3.166666666666667],"a_label":"x","b":[-3.541666666666667,-2.741666666666667,-2.341666666666667],"b_label":"y"}},{"phase":1,"caption":"Center each vector","panel":{"kind":"lines","title":"Centered coordinates","a":[-4.166666666666667,-3.166666666666667,-3.166666666666667,-1.166666666666667,-2.166666666666667,-0.16666666666666696],"a_label":"x","b":[-3.541666666666667,-2.741666666666667,-2.341666666666667,-1.141666666666667,-1.8416666666666668,-0.4416666666666673],"b_label":"y"}},{"phase":1,"caption":"Center each vector","panel":{"kind":"lines","title":"Centered coordinates","a":[-4.166666666666667,-3.166666666666667,-3.166666666666667,-1.166666666666667,-2.166666666666667,-0.16666666666666696,-0.16666666666666696,1.833333333333333,2.833333333333333],"a_label":"x","b":[-3.541666666666667,-2.741666666666667,-2.341666666666667,-1.141666666666667,-1.8416666666666668,-0.4416666666666673,-0.4416666666666673,1.8583333333333334,1.5583333333333327],"b_label":"y"}},{"phase":1,"caption":"Center each vector","panel":{"kind":"lines","title":"Centered coordinates","a":[-4.166666666666667,-3.166666666666667,-3.166666666666667,-1.166666666666667,-2.166666666666667,-0.16666666666666696,-0.16666666666666696,1.833333333333333,2.833333333333333,0.833333333333333,3.833333333333333,4.833333333333333],"a_label":"x","b":[-3.541666666666667,-2.741666666666667,-2.341666666666667,-1.141666666666667,-1.8416666666666668,-0.4416666666666673,-0.4416666666666673,1.8583333333333334,1.5583333333333327,0.958333333333333,3.458333333333333,4.658333333333332],"b_label":"y"}},{"phase":2,"caption":"Accumulate normalized products using fixed full-vector norms","panel":{"kind":"bars","title":"Contribution to normalized dot product","a":[0.18084320617407526,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":0},"value":0.18084320617407526,"value_label":"partial normalized dot product"},{"phase":2,"caption":"Accumulate normalized products using fixed full-vector norms","panel":{"kind":"bars","title":"Contribution to normalized dot product","a":[0.18084320617407526,0.10639537711003715,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":1},"value":0.2872385832841124,"value_label":"partial normalized dot product"},{"phase":2,"caption":"Accumulate normalized products using fixed full-vector norms","panel":{"kind":"bars","title":"Contribution to normalized dot product","a":[0.18084320617407526,0.10639537711003715,0.09087264731890708,0.016322695032558895,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":3},"value":0.3944339256355784,"value_label":"partial normalized dot product"},{"phase":2,"caption":"Accumulate normalized products using fixed full-vector norms","panel":{"kind":"bars","title":"Contribution to normalized dot product","a":[0.18084320617407526,0.10639537711003715,0.09087264731890708,0.016322695032558895,0.04890000294946995,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":4},"value":0.44333392858504833,"value_label":"partial normalized dot product"},{"phase":2,"caption":"Accumulate normalized products using fixed full-vector norms","panel":{"kind":"bars","title":"Contribution to normalized dot product","a":[0.18084320617407526,0.10639537711003715,0.09087264731890708,0.016322695032558895,0.04890000294946995,0.0009020884637389193,0.0009020884637389193,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":6},"value":0.44513810551252614,"value_label":"partial normalized dot product"},{"phase":2,"caption":"Accumulate normalized products using fixed full-vector norms","panel":{"kind":"bars","title":"Contribution to normalized dot product","a":[0.18084320617407526,0.10639537711003715,0.09087264731890708,0.016322695032558895,0.04890000294946995,0.0009020884637389193,0.0009020884637389193,0.04175137738776532,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":7},"value":0.4868894829002915,"value_label":"partial normalized dot product"},{"phase":2,"caption":"Accumulate normalized products using fixed full-vector norms","panel":{"kind":"bars","title":"Contribution to normalized dot product","a":[0.18084320617407526,0.10639537711003715,0.09087264731890708,0.016322695032558895,0.04890000294946995,0.0009020884637389193,0.0009020884637389193,0.04175137738776532,0.05410828728728328,0.009786808804714654,0.0,0.0],"a_label":"contribution","marker":9},"value":0.5507845789922894,"value_label":"partial normalized dot product"},{"phase":2,"caption":"Accumulate normalized products using fixed full-vector norms","panel":{"kind":"bars","title":"Contribution to normalized dot product","a":[0.18084320617407526,0.10639537711003715,0.09087264731890708,0.016322695032558895,0.04890000294946995,0.0009020884637389193,0.0009020884637389193,0.04175137738776532,0.05410828728728328,0.009786808804714654,0.16246102615826333,0.27591992614474664],"a_label":"contribution","marker":11},"value":0.9891655312952994,"value_label":"partial normalized dot product"},{"phase":3,"caption":"Read the signed agreement coefficient","panel":{"kind":"bars","title":"All normalized coordinate products","a":[0.18084320617407526,0.10639537711003715,0.09087264731890708,0.016322695032558895,0.04890000294946995,0.0009020884637389193,0.0009020884637389193,0.04175137738776532,0.05410828728728328,0.009786808804714654,0.16246102615826333,0.27591992614474664],"a_label":"contribution","marker":0},"value":0.9891655312952994,"value_label":"final result"},{"phase":3,"caption":"Read the signed agreement coefficient","panel":{"kind":"bars","title":"All normalized coordinate products","a":[0.18084320617407526,0.10639537711003715,0.09087264731890708,0.016322695032558895,0.04890000294946995,0.0009020884637389193,0.0009020884637389193,0.04175137738776532,0.05410828728728328,0.009786808804714654,0.16246102615826333,0.27591992614474664],"a_label":"contribution","marker":3},"value":0.9891655312952994,"value_label":"final result"},{"phase":3,"caption":"Read the signed agreement coefficient","panel":{"kind":"bars","title":"All normalized coordinate products","a":[0.18084320617407526,0.10639537711003715,0.09087264731890708,0.016322695032558895,0.04890000294946995,0.0009020884637389193,0.0009020884637389193,0.04175137738776532,0.05410828728728328,0.009786808804714654,0.16246102615826333,0.27591992614474664],"a_label":"contribution","marker":7},"value":0.9891655312952994,"value_label":"final result"},{"phase":3,"caption":"Read the signed agreement coefficient","panel":{"kind":"bars","title":"All normalized coordinate products","a":[0.18084320617407526,0.10639537711003715,0.09087264731890708,0.016322695032558895,0.04890000294946995,0.0009020884637389193,0.0009020884637389193,0.04175137738776532,0.05410828728728328,0.009786808804714654,0.16246102615826333,0.27591992614474664],"a_label":"contribution","marker":11},"value":0.9891655312952994,"value_label":"final result"}],"animation_steps_en":["Pair observations at the same sample index.","Center each sample vector independently.","Normalize the centered product sum.","Keep the signed Pearson r."],"echotime_status":"Conceptually covered","echotime_api":"pearson_r"}
