Example: Ice Cream Sales The local ice cream shop keeps track of how much ice cream they sell versus the temperature of that day for the last 12 days: Formulate a null hypothesis and verify it by Pearsons and Spearman coefficients H0: there is no correlation between the number of sales and temperature H1: there is positive correlation between the number of sales and temperature Temperature (°C) Ice Cream Sales ($) rank temperature rank sales d 14.2 215 11 11 0 16.4 325 9 10 -1 11.9 185 12 12 0 15.2 332 10 9 1 18.5 406 6 8 -2 22.1 522 4 3 1 19.4 412 5 6 -1 25.1 614 1 1 0 23.4 544 2 2 0 18.1 421 7 5 2 22.6 445 3 4 -1 17.2 408 8 7 1 sumsq= 14 average average n 12 18.7 402.42 rs>crit value n^3-n 1716 H0 rejected rs= 0.951048951 "crit value (0,05)" 0.587 x1-xaverage y1-yaverage dx*dy dx^2 -4.5 -187.42 838.6895833 -2.3 -77.42 176.1229167 -6.8 -217.42 1472.997917 -3.5 -70.42 244.6979167 -0.2 3.58 -0.627083333 3.4 119.58 409.5729167 0.7 9.58 6.947916667 6.4 211.58 1359.422917 4.7 141.58 668.98125 -0.6 18.58 -10.68541667 3.9 42.58 167.1395833 -1.5 5.58 -8.235416667 177.0 174754.9 5325.025 sum of dx*dy r>crit value H0 rejected 0.957506623 "critical value= 0,576" d.f. 10 alpha 0.05