Unit 3: Programming with Relations ================================== 1. Spreadsheets - Carmen Reinhart, Kenneth Rogoff, American Economic Review 2010. "Growth in a Time of Debt". "Annual economic growth drops by 2% if gross external debt reaches 60% of the GDP." "Annual economic growth drops by ~50% if external debt exceeds 90% of the GDP." Thomas Herndon, Michael Ash and Robert Pollin, Cambridge Journal of Economics, 2013. "Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff" "While using RR's working spreadsheet, we identified coding errors, selective exclusion of available data, and unconventional weighting of summary statistics." "When properly calculated, the average real GDP growth rate for countries carrying a public-debt-to-GDP ratio of over 90 percent is actually 2.2 percent, not −0.1 percent as published in Reinhart and Rogoff." 2. Spreadsheets: Cells, values, formluas, automatic recalculation, DAGs Example 1: Student grades: Average, max, min, median Example 2: Logistic map. Robert May, Nature 1976. "Simple mathematical models with very complicated dynamics". Show chart. x_(n+1) = r x_n (1 - x_n). 0 < r < 1: Population eventually dies 1 < r < 2: Converges to (r - 1) / r, quickly 2 < r < 3: Converges to (r - 1) / r, slowly 3 < r < 1 + sqrt(6) = 3.44949: Induces oscillations, dependent on r. Tools ==> Detective ==> Trace precedents / Trace dependents DAGs: Stateless electronic circuits, Makefiles 3. Relative and absolute references, ranges, named ranges 4. Direct and indirect addressing =ADDRESS(rownum, colnum, [absolute=1, relative row=2, relative col=3, relative=4]) =INDIRECT(cell) 5. Vlookup, Hlookup, Match 6. DFAs using lookup tables 7. Pivot tables