PHYS 27/193: Homework 4
This assignment is due on Monday, June 11 by 5pm.
Type your answers in a text file, save it as LASTNAMEhw4.txt, and drop
it in the dropbox or email it to me.
- Using your "CalPop.dat" file, fit the US Population data
to a cubic function: f(x) = a3*x**3 + a2*x**2 + a1*x + a0.
Find a3, a2, a1 and a0.
- What is your prediction for the US population in 2050?
- Do the same for the California population.
Note that you can put a "using"
after the "filename" in a fit command, the same way you
do when using "u..." (using) in a plot command.
- Plot the ratio of CA population to US population.
- Fit this ratio to a line. What is the slope of this line?
- What year will the CA/US fraction of US population be 15%?
- Save a GIF image of your plot, including your linear fit function.
Name this file "LASTNAMEpopratio.gif" and digital-drop
or email it to me.