Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Below is the data from the population.dat 1900 75994575 1910 91972266 1920 105710620 1930 122775046 1940 131669275 1950 150697361 1960 179323175 1970 203235298 1980 226547082
Below is the data from the population.dat
1900 75994575 1910 91972266 1920 105710620 1930 122775046 1940 131669275 1950 150697361 1960 179323175 1970 203235298 1980 226547082 1990 248709873 2000 281421906 2010 308745538 2020 331449281
3. Load the population data from the US census numbers in file population.dat. (a) Fit a quadratic polynomial to the data. Do this by setting up and using the normal equations, not just by calling polyfit. You will get an error message about the matrix being extremely badly conditioned, but you can ignore that. You could improve the condition number by rescaling the time axis from 1900, 1910,..., 2020 to 0,0.1,...,1.2, but you get a decent-looking fit even with the original time scale. Print out the normal equations, and the coefficients of the polynomial. Hint: The num- bers are of vastly different orders of magnitude. Exponential notation (format long e) is recommended. Plot the original data and the polynomial in a single picture. (b) Fit a curve of the form p(t) = beat, by fitting a straight line to ln(p(t)). Again, print out the normal cquations, the coefficients a and b, and plot the original data and the exponential curve in a single picture. 3. Load the population data from the US census numbers in file population.dat. (a) Fit a quadratic polynomial to the data. Do this by setting up and using the normal equations, not just by calling polyfit. You will get an error message about the matrix being extremely badly conditioned, but you can ignore that. You could improve the condition number by rescaling the time axis from 1900, 1910,..., 2020 to 0,0.1,...,1.2, but you get a decent-looking fit even with the original time scale. Print out the normal equations, and the coefficients of the polynomial. Hint: The num- bers are of vastly different orders of magnitude. Exponential notation (format long e) is recommended. Plot the original data and the polynomial in a single picture. (b) Fit a curve of the form p(t) = beat, by fitting a straight line to ln(p(t)). Again, print out the normal cquations, the coefficients a and b, and plot the original data and the exponential curve in a single pictureStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started