In: Economics
Part 2: Transforming data and computing descriptive statistics
Create a quarterly real GDP series by dividing nominal GDP by the GDP deflator. Also, create a money velocity series as PY/M where P is the price level, Y is real GDP, and M is the M3 money supply measure.
a. Plot the velocity of money (produce a graph similar to Figure 8.2 on page 212 of the textbook). Has velocity risen or fallen over the sample period? b. What is the mean and standard deviation of M3 velocity?
picture from textbook: https://media.cheggcdn.com/media%2Fb3d%2Fb3d56712-5053-405f-83e0-88009e1d6240%2FphpGAezM0.png
data to be used:
observation_date | MABMM301CAQ189S | observation_date | CANGDPDEFQISMEI | Quarterly | v62295562 - Gross domestic product at market prices (x 1,000,000) | ||
1981-01-01 | 2.04311E+11 | 1981-01-01 | 42.69811116 | Q1 1981 | 354,784 | ||
1981-04-01 | 2.07984E+11 | 1981-04-01 | 43.66104146 | Q2 1981 | 366,788 | ||
1981-07-01 | 2.16848E+11 | 1981-07-01 | 44.62899825 | Q3 1981 | 371,560 | ||
1981-10-01 | 2.18082E+11 | 1981-10-01 | 45.29084386 | Q4 1981 | 375,352 | ||
1982-01-01 | 2.17479E+11 | 1982-01-01 | 46.60831697 | Q1 1982 | 381,676 | ||
1982-04-01 | 2.19886E+11 | 1982-04-01 | 47.57980057 | Q2 1982 | 385,140 | ||
1982-07-01 | 2.2233E+11 | 1982-07-01 | 48.37395895 | Q3 1982 | 388,116 | ||
1982-10-01 | 2.24304E+11 | 1982-10-01 | 49.3332838 | Q4 1982 | 392,160 | ||
1983-01-01 | 2.2614E+11 | 1983-01-01 | 49.71327644 | Q1 1983 | 401,680 | ||
1983-04-01 | 2.24478E+11 | 1983-04-01 | 50.26292877 | Q2 1983 | 414,192 | ||
1983-07-01 | 2.25279E+11 | 1983-07-01 | 51.27358864 | Q3 1983 | 427,308 | ||
1983-10-01 | 2.27179E+11 | 1983-10-01 | 51.61005878 | Q4 1983 | 435,584 | ||
1984-01-01 | 2.283E+11 | 1984-01-01 | 51.97043324 | Q1 1984 | 446,148 | ||
1984-04-01 | 2.32617E+11 | 1984-04-01 | 52.30782428 | Q2 1984 | 457,828 | ||
1984-07-01 | 2.37141E+11 | 1984-07-01 | 52.72343939 | Q3 1984 | 463,424 | ||
1984-10-01 | 2.40677E+11 | 1984-10-01 | 53.04197052 | Q4 1984 | 473,572 | ||
1985-01-01 | 2.44981E+11 | 1985-01-01 | 53.42486468 | Q1 1985 | 484,236 | ||
1985-04-01 | 2.48915E+11 | 1985-04-01 | 54.26513634 | Q2 1985 | 493,432 | ||
1985-07-01 | 2.5245E+11 | 1985-07-01 | 54.50504061 | Q3 1985 | 501,888 | ||
1985-10-01 | 2.5701E+11 | 1985-10-01 | 54.84025435 | Q4 1985 | 512,744 | ||
1986-01-01 | 2.64237E+11 | 1986-01-01 | 55.25634718 | Q1 1986 | 516,520 | ||
1986-04-01 | 2.68411E+11 | 1986-04-01 | 55.49059389 | Q2 1986 | 521,696 | ||
1986-07-01 | 2.71948E+11 | 1986-07-01 | 56.09128688 | Q3 1986 | 528,016 | ||
1986-10-01 | 2.8153E+11 | 1986-10-01 | 56.87836721 | Q4 1986 | 531,568 | ||
1987-01-01 | 2.91177E+11 | 1987-01-01 | 57.53317263 | Q1 1987 | 550,140 | ||
1987-04-01 | 2.99965E+11 | 1987-04-01 | 58.33295861 | Q2 1987 | 565,020 | ||
1987-07-01 | 3.05585E+11 | 1987-07-01 | 58.89916591 | Q3 1987 | 579,244 | ||
1987-10-01 | 3.08066E+11 | 1987-10-01 | 59.55513344 | Q4 1987 | 593,300 | ||
1988-01-01 | 3.12459E+11 | 1988-01-01 | 60.19836959 | Q1 1988 | 608,480 | ||
1988-04-01 | 3.22487E+11 | 1988-04-01 | 60.66882712 | Q2 1988 | 618,684 | ||
1988-07-01 | 3.34801E+11 | 1988-07-01 | 61.66399317 | Q3 1988 | 628,884 | ||
1988-10-01 | 3.42958E+11 | 1988-10-01 | 62.46758329 | Q4 1988 | 641,556 | ||
1989-01-01 | 3.51835E+11 | 1989-01-01 | 62.92301878 | Q1 1989 | 653,604 | ||
1989-04-01 | 3.62677E+11 | 1989-04-01 | 63.98918575 | Q2 1989 | 667,232 | ||
1989-07-01 | 3.73418E+11 | 1989-07-01 | 64.65157352 | Q3 1989 | 676,572 | ||
1989-10-01 | 3.85482E+11 | 1989-10-01 | 64.99380354 | Q4 1989 | 678,696 | ||
1990-01-01 | 3.95554E+11 | 1990-01-01 | 65.40531748 | Q1 1990 | 689,404 | ||
1990-04-01 | 4.0366E+11 | 1990-04-01 | 66.03354097 | Q2 1990 | 693,132 | ||
1990-07-01 | 4.10993E+11 | 1990-07-01 | 66.70745429 | Q3 1990 | 695,180 | ||
1990-10-01 | 4.1872E+11 | 1990-10-01 | 67.22290923 | Q4 1990 | 694,272 | ||
1991-01-01 | 4.27352E+11 | 1991-01-01 | 67.93588676 | Q1 1991 | 691,484 | ||
1991-04-01 | 4.32806E+11 | 1991-04-01 | 68.36517541 | Q2 1991 | 699,036 | ||
1991-07-01 | 4.33277E+11 | 1991-07-01 | 68.59406171 | Q3 1991 | 702,272 | ||
1991-10-01 | 4.39453E+11 | 1991-10-01 | 68.66059067 | Q4 1991 | 704,220 | ||
1992-01-01 | 4.45823E+11 | 1992-01-01 | 68.94091388 | Q1 1992 | 707,560 | ||
1992-04-01 | 4.50337E+11 | 1992-04-01 | 69.32202186 | Q2 1992 | 712,328 | ||
1992-07-01 | 4.57429E+11 | 1992-07-01 | 69.62116203 | Q3 1992 | 719,252 | ||
1992-10-01 | 4.64677E+11 | 1992-10-01 | 69.77651809 | Q4 1992 | 724,936 | ||
1993-01-01 | 4.70009E+11 | 1993-01-01 | 69.96565871 | Q1 1993 | 731,528 | ||
1993-04-01 | 4.72942E+11 | 1993-04-01 | 70.41575784 | Q2 1993 | 742,932 | ||
1993-07-01 | 4.75799E+11 | 1993-07-01 | 70.19167988 | Q3 1993 | 747,640 | ||
1993-10-01 | 4.79652E+11 | 1993-10-01 | 70.70364286 | Q4 1993 | 756,332 | ||
1994-01-01 | 4.8357E+11 | 1994-01-01 | 70.95633662 | Q1 1994 | 770,204 | ||
1994-04-01 | 4.89883E+11 | 1994-04-01 | 70.93029423 | Q2 1994 | 781,204 | ||
1994-07-01 | 5.00109E+11 | 1994-07-01 | 71.5711307 | Q3 1994 | 798,332 | ||
1994-10-01 | 5.03525E+11 | 1994-10-01 | 71.94169718 | Q4 1994 | 808,288 | ||
1995-01-01 | 5.07562E+11 | 1995-01-01 | 72.43909165 | Q1 1995 | 821,384 | ||
1995-04-01 | 5.15417E+11 | 1995-04-01 | 72.8401001 | Q2 1995 | 826,212 | ||
1995-07-01 | 5.24551E+11 | 1995-07-01 | 73.10778253 | Q3 1995 | 830,332 | ||
1995-10-01 | 5.29711E+11 | 1995-10-01 | 73.48182065 | Q4 1995 | 837,964 | ||
1996-01-01 | 5.39297E+11 | 1996-01-01 | 73.73975025 | Q1 1996 | 841,428 | ||
1996-04-01 | 5.45922E+11 | 1996-04-01 | 73.98403847 | Q2 1996 | 850,092 | ||
1996-07-01 | 5.50767E+11 | 1996-07-01 | 74.34930978 | Q3 1996 | 861,784 | ||
1996-10-01 | 5.55781E+11 | 1996-10-01 | 74.87572976 | Q4 1996 | 874,788 | ||
1997-01-01 | 5.65662E+11 | 1997-01-01 | 75.08368347 | Q1 1997 | 888,792 | ||
1997-04-01 | 5.70634E+11 | 1997-04-01 | 74.88081067 | Q2 1997 | 896,372 | ||
1997-07-01 | 5.75825E+11 | 1997-07-01 | 75.08607625 | Q3 1997 | 909,568 | ||
1997-10-01 | 5.85016E+11 | 1997-10-01 | 75.29788696 | Q4 1997 | 920,876 | ||
1998-01-01 | 5.88563E+11 | 1998-01-01 | 75.10463509 | Q1 1998 | 931,392 | ||
1998-04-01 | 5.92121E+11 | 1998-04-01 | 75.11357127 | Q2 1998 | 931,908 | ||
1998-07-01 | 5.97459E+11 | 1998-07-01 | 74.72571561 | Q3 1998 | 935,696 | ||
1998-10-01 | 6.02599E+11 | 1998-10-01 | 74.87131258 | Q4 1998 | 950,184 | ||
1999-01-01 | 6.02129E+11 | 1999-01-01 | 75.21325796 | Q1 1999 | 971,824 | ||
1999-04-01 | 6.13187E+11 | 1999-04-01 | 76.03927032 | Q2 1999 | 990,748 | ||
1999-07-01 | 6.21062E+11 | 1999-07-01 | 76.91249304 | Q3 1999 | 1,017,736 | ||
1999-10-01 | 6.32911E+11 | 1999-10-01 | 77.30843557 | Q4 1999 | 1,037,516 | ||
2000-01-01 | 6.48037E+11 | 2000-01-01 | 78.22530767 | Q1 2000 | 1,066,576 | ||
2000-04-01 | 6.58564E+11 | 2000-04-01 | 79.42312702 | Q2 2000 | 1,095,808 | ||
2000-07-01 | 6.74681E+11 | 2000-07-01 | 80.21978873 | Q3 2000 | 1,117,980 | ||
2000-10-01 | 6.83844E+11 | 2000-10-01 | 80.87774982 | Q4 2000 | 1,129,156 | ||
2001-01-01 | 6.93689E+11 | 2001-01-01 | 81.65841791 | Q1 2001 | 1,145,988 | ||
2001-04-01 | 6.96378E+11 | 2001-04-01 | 81.65117527 | Q2 2001 | 1,148,844 | ||
2001-07-01 | 7.0454E+11 | 2001-07-01 | 80.70759895 | Q3 2001 | 1,134,708 | ||
2001-10-01 | 7.1682E+11 | 2001-10-01 | 80.0583262 | Q4 2001 | 1,132,480 | ||
2002-01-01 | 7.29263E+11 | 2002-01-01 | 80.41861287 | Q1 2002 | 1,154,524 | ||
2002-04-01 | 7.34895E+11 | 2002-04-01 | 81.83423125 | Q2 2002 | 1,181,544 | ||
2002-07-01 | 7.50367E+11 | 2002-07-01 | 82.38631683 | Q3 2002 | 1,199,908 | ||
2002-10-01 | 7.58437E+11 | 2002-10-01 | 83.42950962 | Q4 2002 | 1,221,832 | ||
2003-01-01 | 7.61874E+11 | 2003-01-01 | 84.59159619 | Q1 2003 | 1,245,676 | ||
2003-04-01 | 7.82063E+11 | 2003-04-01 | 83.87561141 | Q2 2003 | 1,233,300 | ||
2003-07-01 | 7.96029E+11 | 2003-07-01 | 84.95635352 | Q3 2003 | 1,253,900 | ||
2003-10-01 | 8.07003E+11 | 2003-10-01 | 85.3524376 | Q4 2003 | 1,268,384 | ||
2004-01-01 | 8.30867E+11 | 2004-01-01 | 86.29841734 | Q1 2004 | 1,291,688 | ||
2004-04-01 | 8.50393E+11 | 2004-04-01 | 87.39335372 | Q2 2004 | 1,323,544 | ||
2004-07-01 | 8.63961E+11 | 2004-07-01 | 87.89404677 | Q3 2004 | 1,346,952 | ||
2004-10-01 | 8.85819E+11 | 2004-10-01 | 88.27669893 | Q4 2004 | 1,362,528 | ||
2005-01-01 | 9.14545E+11 | 2005-01-01 | 88.82847112 | Q1 2005 | 1,375,720 | ||
2005-04-01 | 9.38963E+11 | 2005-04-01 | 89.42817592 | Q2 2005 | 1,394,868 | ||
2005-07-01 | 9.54247E+11 | 2005-07-01 | 90.72483988 | Q3 2005 | 1,432,508 | ||
2005-10-01 | 9.62155E+11 | 2005-10-01 | 91.87374486 | Q4 2005 | 1,465,016 | ||
2006-01-01 | 9.81505E+11 | 2006-01-01 | 91.54859597 | Q1 2006 | 1,471,532 | ||
2006-04-01 | 9.99682E+11 | 2006-04-01 | 92.42400195 | Q2 2006 | 1,486,320 | ||
2006-07-01 | 1.02234E+12 | 2006-07-01 | 93.05784619 | Q3 2006 | 1,500,672 | ||
2006-10-01 | 1.04904E+12 | 2006-10-01 | 93.3031751 | Q4 2006 | 1,510,304 | ||
2007-01-01 | 1.07602E+12 | 2007-01-01 | 94.71213816 | Q1 2007 | 1,543,024 | ||
2007-04-01 | 1.10249E+12 | 2007-04-01 | 95.59095835 | Q2 2007 | 1,572,372 | ||
2007-07-01 | 1.14279E+12 | 2007-07-01 | 95.53638302 | Q3 2007 | 1,578,004 | ||
2007-10-01 | 1.17806E+12 | 2007-10-01 | 96.77660407 | Q4 2007 | 1,600,728 | ||
2008-01-01 | 1.21117E+12 | 2008-01-01 | 98.67959821 | Q1 2008 | 1,633,172 | ||
2008-04-01 | 1.25192E+12 | 2008-04-01 | 100.7423479 | Q2 2008 | 1,673,096 | ||
2008-07-01 | 1.28028E+12 | 2008-07-01 | 100.9439217 | Q3 2008 | 1,690,428 | ||
2008-10-01 | 1.30447E+12 | 2008-10-01 | 97.56793201 | Q4 2008 | 1,614,996 | ||
2009-01-01 | 1.29867E+12 | 2009-01-01 | 96.02749385 | Q1 2009 | 1,553,180 | ||
2009-04-01 | 1.29828E+12 | 2009-04-01 | 96.54850348 | Q2 2009 | 1,544,376 | ||
2009-07-01 | 1.3059E+12 | 2009-07-01 | 97.33262931 | Q3 2009 | 1,563,964 | ||
2009-10-01 | 1.31498E+12 | 2009-10-01 | 98.90114935 | Q4 2009 | 1,607,940 | ||
2010-01-01 | 1.32874E+12 | 2010-01-01 | 99.68889426 | Q1 2010 | 1,640,056 | ||
2010-04-01 | 1.36292E+12 | 2010-04-01 | 99.73092225 | Q2 2010 | 1,649,184 | ||
2010-07-01 | 1.39202E+12 | 2010-07-01 | 99.76256572 | Q3 2010 | 1,661,488 | ||
2010-10-01 | 1.40577E+12 | 2010-10-01 | 100.8028477 | Q4 2010 | 1,697,792 | ||
2011-01-01 | 1.43135E+12 | 2011-01-01 | 102.1875932 | Q1 2011 | 1,733,840 | ||
2011-04-01 | 1.45784E+12 | 2011-04-01 | 103.2762484 | Q2 2011 | 1,755,640 | ||
2011-07-01 | 1.48928E+12 | 2011-07-01 | 103.3687047 | Q3 2011 | 1,781,600 | ||
2011-10-01 | 1.52151E+12 | 2011-10-01 | 104.1128451 | Q4 2011 | 1,808,604 | ||
2012-01-01 | 1.55116E+12 | 2012-01-01 | 104.2014187 | Q1 2012 | 1,810,720 | ||
2012-04-01 | 1.57589E+12 | 2012-04-01 | 104.0827415 | Q2 2012 | 1,814,628 | ||
2012-07-01 | 1.59536E+12 | 2012-07-01 | 104.5453546 | Q3 2012 | 1,826,288 | ||
2012-10-01 | 1.61098E+12 | 2012-10-01 | 105.1788905 | Q4 2012 | 1,839,596 | ||
2013-01-01 | 1.63607E+12 | 2013-01-01 | 105.9475736 | Q1 2013 | 1,872,136 | ||
2013-04-01 | 1.67053E+12 | 2013-04-01 | 105.8155098 | Q2 2013 | 1,881,924 | ||
2013-07-01 | 1.69833E+12 | 2013-07-01 | 106.3926058 | Q3 2013 | 1,907,692 | ||
2013-10-01 | 1.75066E+12 | 2013-10-01 | 106.4727711 | Q4 2013 | 1,928,372 | ||
2014-01-01 | 1.78916E+12 | 2014-01-01 | 108.0058207 | Q1 2014 | 1,958,572 | ||
2014-04-01 | 1.81251E+12 | 2014-04-01 | 108.0948485 | Q2 2014 | 1,983,684 | ||
2014-07-01 | 1.85501E+12 | 2014-07-01 | 108.6916969 | Q3 2014 | 2,009,164 | ||
2014-10-01 | 1.89181E+12 | 2014-10-01 | 108.2081793 | Q4 2014 | 2,009,312 | ||
2015-01-01 | 1.92827E+12 | 2015-01-01 | 107.1608189 | Q1 2015 | 1,985,880 | ||
2015-04-01 | 1.95461E+12 | 2015-04-01 | 107.4289334 | Q2 2015 | 1,987,968 | ||
2015-07-01 | 2.01857E+12 | 2015-07-01 | 107.7699516 | Q3 2015 | 2,005,556 | ||
2015-10-01 | 2.05577E+12 | 2015-10-01 | 107.3727069 | Q4 2015 | 2,000,240 | ||
2016-01-01 | 2.09906E+12 | 2016-01-01 | 107.1804261 | Q1 2016 | 2,008,964 | ||
2016-04-01 | 2.14464E+12 | 2016-04-01 | 107.4862374 | Q2 2016 | 2,009,416 | ||
2016-07-01 | 2.19735E+12 | 2016-07-01 | 108.2285573 | Q3 2016 | 2,044,564 | ||
2016-10-01 | 2.2347E+12 | 2016-10-01 | 109.4481763 | Q4 2016 | 2,079,080 | ||
2017-01-01 | 2.25137E+12 | 2017-01-01 | 110.2520312 | Q1 2017 | 2,115,064 | ||
2017-04-01 | 2.30112E+12 | 2017-04-01 | 110.1958834 | Q2 2017 | 2,136,712 | ||
2017-07-01 | 2.29036E+12 | 2017-07-01 | 110.2431625 | Q3 2017 |
A. REAL GDP AND MONEY VELOCITY CALCULATED IN THE TABLE (JUST FEW ROWS AS I WAS UNABLE TO PASTE ENTIRE EXCEL)
observation_date |
MABMM301CAQ189S (M) |
CANGDPDEFQISMEI : GDP DEFLATOR (P) |
Quarterly |
v62295562 - Gross domestic product at market prices (x 1,000,000) (NOMINAL GDP) |
Real gdp (G ): Y = NOMINAL GDP/ GDP DEFLATOR |
money velocity series as PY/M |
sunstracting money velocity from mean (1.53) = U |
U2 = square of U |
1/1/1981 |
2.04E+11 |
42.69811116 |
Q1 1981 |
354,784 |
8,309,126,337 |
1.74 |
0.21 |
0.04 |
4/1/1981 |
2.08E+11 |
43.66104146 |
Q2 1981 |
366,788 |
8,400,807,396 |
1.76 |
0.23 |
0.05 |
7/1/1981 |
2.17E+11 |
44.62899825 |
Q3 1981 |
371,560 |
8,325,528,570 |
1.71 |
0.18 |
0.03 |
10/1/1981 |
2.18E+11 |
45.29084386 |
Q4 1981 |
375,352 |
8,287,591,222 |
1.72 |
0.19 |
0.04 |
1/1/1982 |
2.17E+11 |
46.60831697 |
Q1 1982 |
381,676 |
8,189,010,563 |
1.76 |
0.23 |
0.05 |
4/1/1982 |
2.20E+11 |
47.57980057 |
Q2 1982 |
385,140 |
8,094,611,482 |
1.75 |
0.22 |
0.05 |
7/1/1982 |
2.22E+11 |
48.37395895 |
Q3 1982 |
388,116 |
8,023,242,431 |
1.75 |
0.22 |
0.05 |
10/1/1982 |
2.24E+11 |
49.3332838 |
Q4 1982 |
392,160 |
7,949,197,171 |
1.75 |
0.22 |
0.05 |
1/1/1983 |
2.26E+11 |
49.71327644 |
Q1 1983 |
401,680 |
8,079,934,150 |
1.78 |
0.25 |
0.06 |
4/1/1983 |
2.24E+11 |
50.26292877 |
Q2 1983 |
414,192 |
8,240,506,674 |
1.85 |
0.32 |
0.10 |
7/1/1983 |
2.25E+11 |
51.27358864 |
Q3 1983 |
427,308 |
8,333,881,270 |
1.90 |
0.37 |
0.13 |
B. VELOCITY OF MENOY HAS BEEN PLOTTED IN THE GRAPH. Money velocity has definitely fallen over the chart period from 1.7 (in 1980s) to 0.9 (in 2017).
Mean of velocity is: average = sum of all obcervations/number of observations = 223.69/146 = 1.53
Standard deviation of M3 velocity = square root of [{ sum of (all observations – average mean)2 }/number of observations]
à in above table, std deviation= square root of [(sum of U2)/146] à square root {11.69/146} à
square root (0.08) à 0.2828