Monday, December 17, 2012

The Deficit - part three of three


The US deficit has reached unprecedented levels in the last five years.
The orange line represents the yearly incremental deficit as a percent of GDP.  The dark red line represents the yearly incremental deficit as a percent of total federal government outlays.  The red and blue shading represents party control of the House, the Senate, and the Presidency.  (The white space from 2001-2002 represents an even split in the Senate.)

These values are not due to welfare and they’re not due to war.  They’re not the results of a republican government, and they’re not the result of a democratic government.  They are the results of poor fiscal planning and a lack of government responsibility, regardless of which party is in control.

(click on image to enlarge)




Data Sources:
Budget data http://www.gpo.gov/
GDP data http://www.bea.gov/
Unemployment data http://www.bls.gov/
Party data http://en.wikipedia.org/wiki/Party_divisions_of_United_States_Congresses

GDP, Unemployment, and Welfare - part two of three

The United States GDP – the value of all the goods and services produced in one year – is a direct measure of economic growth.  In the chart below, the green line represents GDP growth (recession), and the yellow line represents the unemployment rate.  As is clear below, GDP growth and recession tends to be a predictor of unemployment percentages.  When the economy grows, unemployment decreases - when the economy contracts, unemployment increases.  The correlation coefficient between GDP growth and unemployment in the next year shows a negative correlation at   -.62

(click on image to enlarge)

Although estimates on federal welfare spending range quite a bit, the blue line below represents a simplified estimate: the total percent of the federal budget allocated to housing assistance, food assistance, and other income security – sections 604, 605, and 609.  The yellow line again represents the unemployment rate.  The red and blue shading represents party control of the House, the Senate, and the Presidency.  (The white space from 2001-2002 represents an even split in the Senate.)

Intuitive as it may be, it’s clear that a spike in unemployment tends to be correlated with an increase in welfare spending.  Therefore, a recession in GDP causes an increase in unemployment, and an increase in unemployment tends to be correlated with an increase in welfare spending.  (In addition to chickens laying eggs, there are also some eggs hatching chickens – but the data supports GDP → Unemployment & Welfare.)  1993 and 1994 look like notable exceptions where a drastic decrease in unemployment did NOT impact the growing percent of the federal budget going to welfare.  1995-2007 demonstrates another observation that should be intuitive: percent welfare spending is more difficult to decrease than it is to increase.

(click on image to enlarge)




Data Sources:
Budget data http://www.gpo.gov/
GDP data http://www.bea.gov/
Unemployment data http://www.bls.gov/
Party data http://en.wikipedia.org/wiki/Party_divisions_of_United_States_Congresses

War hawks and Socialists - part one of three



“The War hawks controlling Washington are bankrupting our country!”
“The Socialists controlling Washington are bankrupting our country!”

Despite the claims of partisan media, does a Republican government appreciably increase defense spending, and does a Democratic government appreciably increase welfare spending?

In the chart below, the red and blue shading represents party control of the House, the Senate, and the Presidency.  (The white space from 2001-2002 represents an even split in the Senate.)

The red line represents the total of section 050 of the federal budget – National Defense.

Welfare spending is a bit more difficult to discern.  There is no “welfare” line item within the federal budget, and the debate on what exactly constitutes welfare spending could fill a Ph.D. dissertation.  Although estimates range, the blue line represents the total of housing assistance, food assistance, and other income security – sections 604, 605, and 609 of the federal budget.  These three line items within the “Income Security” subsection refer to programs that provide direct assistance to the poor, but differ from programs like unemployment and disability where qualification depends on some previous contribution.

It’s tempting to associate the 2001 spike in Defense spending with the Republican monopoly in Washington, but the start of the War on Terror is probably a much more likely cause.  It’s similarly tempting to associate the 2007 increase in welfare spending with the Democratic control of Congress, but again, the housing bubble burst / market retreat is likely a better suspect.

The mathematically derived correlations are all very low – but the data shows that the level of Democratic control in the government has a weak negative correlation on BOTH defense spending and welfare spending (with an ever so slight preference for defense).  The level of Republican control in the governments has a weak positive correlation on both defense spending and welfare spending (with an ever so slight preference for welfare).

Talk about an unexpected result…

I am not suggesting every stereotype ever associated with our two-party system is incorrect; there are limitations to this data, and the correlations demonstrated are weak.  What I am suggesting is that the partisan media greatly exaggerates the effect on the federal budget from the “republicans versus democrats” ideology conflict.

(click on image to enlarge)



Correlation Dem to Welfare -0.31651
Correlation Dem to Defense -0.30328
Correlation Rep to Welfare         0.30703
Correlation Rep to Defense 0.30640

Data Sources:
Budget data http://www.gpo.gov/
GDP data http://www.bea.gov/
Unemployment data http://www.bls.gov/
Party data http://en.wikipedia.org/wiki/Party_divisions_of_United_States_Congresses








Friday, July 27, 2012

Installing Ubuntu on a Chromebook

As far as I can tell, this post on the Chromium.org site is the most complete set of instructions for installing Ubuntu on the Chromebook.  If you don't have the time or the technical confidence to run through their procedure, Jay Lee has an awesome scripted method to install Ubuntu 12.04.  Sadly, this most recent entry from Jay is meant for a 64-bit system, and although Chromium was 64-bit for some time, Google had to revert back to 32-bit when some problems were reported.  So - what we're left with is an earlier post from Jay Lee to add Ubuntu 11.04 to your Chromebook.  Once installed, you can follow the standard upgrade path within Ubuntu to move to version 11.10, and then on to version 12.04.

Here are the complete steps I followed for the Samsung Series 5
(mostly following the procedure from Jay Lee).

1.  Developer Mode
You'll want to follow this procedure on Chromium.org, but if want to cut to the chase - the's the short of it:

a.  Flip the switch behind the door on the right side of the machine - the switch should be pushed towards the back of the device.


b.  Add the developer BIOS - At the login screen, press Ctrl-Alt-"→" (Ctrl-Alt-F2). This should bring up a shell (terminal) prompt.  Log in with the username 'chronos' and then run this command:
         sudo chromeos-firmwareupdate --mode=todev


2.  Start the Jay Lee script
Again, logged in as "chronos" run this command from the shell prompt:
        "wget http://goo.gl/hnkxo; sudo sh hnkxo"
You'll have to choose a partition size for the Ubuntu file system - 5-10GB.
5 provides very little room for Ubuntu, 10 leaves almost no room for Chrome.
7GB works well for me.
Give this a few mins to run, and wait for the machine to reboot automatically.

3.  Run the script again to start fetching the Ubuntu files
Same process again - log in as "chronos" and kick off the script:
        "wget http://goo.gl/hnkxo; sudo sh hnkxo"
This time through, the script will start downloading 50 something files.
Once this is complete, Ubuntu should start.
Username and password is "user"

4.  Resize the Ubuntu partition
Run this command to ensure the Ubuntu partition is using the full space allocated:
     sudo resize2fs -p /dev/sda7

5.  Upgrade Ubuntu
Hit the "Dash Home" (first slot in the taskbar on the left) and search for "Update Manager"
First "Check" for updates, and then "Install Updates"
Only once the one-off updates are complete should you then click the button to upgrade to 11.10
Follow the same process to upgrade to 12.04

6. Clean as needed
If you start running out of space during the upgrade process, search for a program called "Computer Janitor" to clean up some unnecessary files.


7.  Switch back to Chrome (and back to Ubuntu)

Google will switch back and forth between kernel A and kernel B as it updates your device.  If you've been using your device for some time, you might have a version of Chrome in A and B.  The above process installs Ubuntu in kernel C.  All that's left to do to choose between Chrome and Ubuntu is to choose your boot priority.

In a term window run this to get a look at where your kernels are:
sudo cgpt show /dev/sda

Here are the tags for cgpt
-i is the parition number
-P is the priority
-T is the number of attempts (tries)
-S is the successful flag (1 or 0)


Here's a sample -

Make Ubuntu the priority, but only give it one try, and fallback to kernel A if it doesn't work:
sudo cgpt add -i 6 -P 5 -T 1 -S 0 /dev/sda
sudo cgpt add -i 2 -P 4 -S 1 /dev/sda



8.  If all else fails...
Restore your Chromebook to factory spec.
This procedure should walk you through it.
And you can turn off developer mode with the "Leaving Developer Mode" section of the original how-to.



9.  Ubuntu 12.04 - What next?
Try this.