06.09.2021 Views

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 5. APPROXIMATION THEORY 197<br />

Exercise 5.1-1: F<strong>in</strong>d the function of the form y = ae x + b s<strong>in</strong>(4x) that best fits the<br />

data below <strong>in</strong> the least squares sense.<br />

x 1 2 3 4 5<br />

y -4 6 -1 5 20<br />

Plot the function and the data together.<br />

Exercise 5.1-2: Power-law type relationships are observed <strong>in</strong> many empirical data.<br />

Two variables y, x are said to be related via a power-law if y = kx α , where k, α are some<br />

constants. The follow<strong>in</strong>g data 2 lists the top 10 family names <strong>in</strong> the order of occurrence<br />

accord<strong>in</strong>g to Census 2000. Investigate whether relative frequency of occurrences and the<br />

rank of the name are related via a power-law, by<br />

a) Let y be the relative frequencies (number of occurrences divided by the total number<br />

of occurrences), and x be the rank, that is, 1 through 10.<br />

b) Use least squares to f<strong>in</strong>d a function of the form y = kx α . Use l<strong>in</strong>earization.<br />

c) Plot the data together <strong>with</strong> the best fitt<strong>in</strong>g function found <strong>in</strong> part (b).<br />

2 https://www.census.gov/topics/population/genealogy/data/2000_surnames.html

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!