Skip to main content

Solution Manual For Geophysical Data Analysis and Inverse Theory with MATLAB® and Python 5th Edition

Page 1

Solutions to Problems Geophysical Data Analysis and Inverse Theory with MATLAB® and Python Fifth Edition 2.1 Suppose that you determine the masses of 100 objects by weighing the first, then weighing the first and second together, and then weighing the rest in triplets: the first, second, and third; the second, third, and fourth; and so forth. (A) Identify the data and model parameters in this problem. How many of each are there? (B) Write down the matrix, 𝐆, in the equation, 𝐝 = 𝐆𝐦, that relates the data to the model parameters. (C) How sparse is 𝐆? What percent of it is zero (A) The 100 masses of the objects are the model parameters. The 100 weights, as determined by a scale, are the data. (B) The data kernel is 100×100 1 0 0 0 0 0 ⋯ 0 1 1 0 0 0 0 ⋯ 0 1 1 1 0 0 0 ⋯ 0 𝐆= 0 1 1 1 0 0 ⋯ 0 0 0 1 1 1 0 ⋯ 0 ⋱ [0 0 0 0 0 1 1 1 ] (C) The data kernel has 10,000 elements, of which about 300 are non-zero, so it is about 9,700/10,000 = 97% zero. 2.2 Suppose that you determine the height of 50 objects by measuring the first, and then stacking the second on top of the first and measuring their combined height, stacking the third on top of the first two and measuring their combined height, and so forth. (A) Identify the data and model parameters in this problem. How many of each are there? (B) Write down the matrix, 𝐆, in the equation, 𝐝 = 𝐆𝐦, that relates the data to the model parameters. (C) How sparse is 𝐆? What percent of it is zero? (A) The 50 heights of the objects are the model parameters. The 50 heights of the stack, as measured by a ruler, are the data. (B) The data kernel is 50×50 1 1 1 𝐆= 1 1

0 1 1 1 1

0 0 1 1 1

0 0 0 1 1

0 0 0 0 1

0 0 0 0 0

⋯ 0 ⋯ 0 ⋯ 0 ⋯ 0 ⋯ 0 ⋱ [1 1 1 1 1 1 1 1 ] (C) The data kernel has 2500 elements, of which somewhat less than half are non-zero, so it is about 50% zero.


2.3 Write a MATLAB® or Python script to compute 𝐆 in the case of the cubic equation, 𝑇 = 𝑇 = 𝑎 + 𝑏𝑧 + 𝑐𝑧 2 + 𝑑𝑧 3 . Assume that 11 𝑧s are equally spaced from 0 to 10. See scripts gdasolnma02_03 and gdasolnpy02_03. 2.4 Let the data, 𝐝, be the running average of the model parameters, 𝐦, computed by averaging groups of three neighboring points; that is, 𝑑𝑖 = ⅓𝑚𝑖−1 + ⅓𝑚𝑖 + ⅓𝑚𝑖+1 . (A) What is the matrix, 𝐆, in the equation, 𝐝 = 𝐆𝐦, in this case? (B) What problems arise at the top and bottom rows of the matrix and how can you deal with them? (C) How sparse is 𝐆? What percent of it is zero? (A) The data kernel is N×M where N=M-4, and has the form 1 1 0 𝐆= 0 3

1 1 0 1 1 1 0 1 1

0 0 1

[0

0 0 0

0

0 0 0 ⋱ 1

⋯ ⋯ ⋯

0 0 0

1

1]

(B) Note that we can regard the running average di=(mi-1,mi,mi+1) as being centered about model parameter mi. However, no datum represents an average centered about model parameters 1, 2, M-1 or M. One could possible deal with them by adding two rows at the top and two at the bottom, such as 1 0 0 0 0 0 ⋯ 0 1/2 1/2 0 0 0 0 ⋯ 0 1/3 1/3 1/3 0 0 0 ⋯ 0 0 1/3 1/3 1/3 0 0 ⋯ 0 𝐆= 0 0 1/3 1/3 1/3 0 ⋯ 0 ⋱ 0 0 0 0 0 1/3 1/3 1/3 0 0 0 0 0 0 1/2 1/2 [ 0 0 0 0 0 0 0 0 ] These rows are not three-point running averages, but at least they are roughly centered about the first and last pairs of model parameters. (C) The sparseness of the data kernel depends upon its size. About 100×(M-3)/M = 100×(1-3/M) percent of its elements are zero. 2.5 Simplify Eq. (2.22) by assuming that there is only one sample, 𝑆1𝑗 , whose composition is measured. Consider the case where the composition of the 𝑃 factors is known, but their proportions in the sample are unknown, and rewrite the equation in the form, 𝐝 = 𝐆𝐦. Hint: You might start by taking the transpose of Eq. (2.22).


The equation becomes 𝐹11 𝑆11 𝐹 𝑆 [ 12 ] = 12 ⋮ ⋮ 𝑆1𝑀 𝐹 [ 1𝑀

𝐹21 𝐹22 ⋮ 𝐹2𝑀

⋯ ⋯ ⋯ ⋯

𝐹𝑝1 𝐶11 𝐹𝑝2 𝐶12 [ ] ⋮ ⋮ 𝐹𝑝𝑀 ] 𝐶1𝑀

The composition of the sample is measured, so they the data. The factor loadings are unknown, so they are the model parameters. The equation is then form d=Gm, as long as we presume that the composition of the factors are known. 3.1 What is the mean and variance of the uniform distribution, 𝑝(𝑑) = 1 on the interval, (0,1)? The mean and variance are: 1

1

〈𝑑〉 = ∫ 𝑑 d𝑑 = 0 1 2

𝜎 = ∫ (𝑑 − ½) d𝑑 = ∫ 0

1

1 2

0

𝑑2 | =½−0=½ 2 0

(𝑑2

1

𝑑3 𝑑2 𝑑1 1 1 1 4 6 3 1 − 𝑑 + ¼) d𝑑 = | − | + | = − + = − + = 3 0 2 0 4 0 3 2 4 12 12 12 12

This result can be used in script, as in gdasolnma03_01 and gdasolnpy03_031 3.2 Suppose 𝑑 is a Normal random variable with zero mean and unit variance. What is the probability density function of 𝐸 = 𝑑2 ? Hint: Since the sign of 𝑑 gets lost when it is squared, you can assume that 𝑝(𝑑) is one-sided, that is, defined for only 𝑑 ≥ 0 and with twice the amplitude of the usual Normal pdf. The p.d.f. of a Gaussian-distributed variable with zero mean and unit variance on the interval (0,∞) is twice the corresponding p.d.f. on the (-∞,∞) interval, or

𝑝(𝑒) = √

2 exp (−½𝑒 2 ) 𝜋

Given the function E=e2, or e=E½, we note that (0,∞) on e corresponds to (0,∞) on E. The derivative is de/dE = ½E-½. The p.d.f. for E is then:

𝑑𝑒 2 1 1 𝑝(𝐸) = 𝑝(𝑒(𝐸)) | | = √ exp (−½𝐸) = √ exp (−½𝐸) 𝑑𝐸 𝜋 2√𝐸 2𝜋𝐸


Note that this function has an integrable singularity at E=0. 3.3 Write a script that uses MATLAB's random('Normal',…) function or Python's np.random.normal(…) method to create a column-vector, d, of N=1000 realizations of a Normally-distributed random variable with mean, dbar=4, and standard deviation, sigmad=2. Count up the number of instances where 𝑑 > 〈𝑑〉 + 2𝜎𝑑 . Is this about the number you expected? See scripts gda_solnma03_03 and gda_solnpy03_03. I get about 2.5%, which is the right number. 3.4 Suppose that the data are uncorrelated with uniform variance, [cov 𝐝] = 𝜎𝑑2 𝐈, and that the model parameters are linear functions of the data, 𝐦 = 𝐌𝐝, where 𝐌 is a matrix. (A) What 2 property must 𝐌 have for the model parameters to be uncorrelated with uniform variance, 𝜎𝑚 ? (B) Express this property in terms of the rows of 𝐌. (A) The usual error propagation formula is [cov m] = M[cov d]MT. We are given the simplification, [cov d]=σd2I, so [cov m] = σd2MMT. This can only be proportional to σm2I when MMT∝I which implies MT∝M-1; that is M is proportional to a unary matrix. (B) The rows of M must be mutually orthogonal unit vectors and they all must have the same length. 3.5 Use the transformation method to compute realizations of the probability density function, 𝑝(𝑚) = 3𝑚2 , on the interval, (0,1), starting from realizations of the uniform distribution, 𝑝(𝑑) = 1. Check your results by plotting a histogram. We are given p(m)=3m2. The cumulative distribution is P=m3 and its inverse is m=P1/3. A histogram (blue) based on L=10000 realizations were compute using scripts gda_solnma03_05 and gda_solnma03_05. They compare favorably to the true pdf. (red).

p(m)

2 1 0

0

0.2

0.4

0.6

0.8

1

m

4.1 Show that the equations worked out for the straight line problem in Eq. (4.14) have the solution given in Eq. (4.20).


After canceling a factor of 2 and rearranging, the text gives 𝑁

𝑁

𝑁𝑚1 + 𝑚2 ∑ 𝑧𝑖 = ∑ 𝑑𝑖 𝑁

𝑖=1

𝑖=1

𝑁

𝑁

𝑚1 ∑ 𝑧𝑖 + 𝑚2 ∑ 𝑧𝑖2 = ∑ 𝑧𝑖 𝑑𝑖 𝑖=1

𝑖=1

𝑖=1

or in matrix form 𝑁

𝑁

∑ 𝑧𝑖

𝑁

𝑖=1 𝑁

∑ 𝑧𝑖

∑ 𝑧𝑖2

[ 𝑖=1

𝑖=1

𝑁

𝑚1 [𝑚 ] = 2 ]

∑ 𝑑𝑖

𝑚1 or [𝑚 ] = 2

𝑖=1 𝑁

∑ 𝑧𝑖 𝑑𝑖

[ 𝑖=1

−1

𝑁

]

𝑁

𝑁

∑ 𝑧𝑖

∑ 𝑑𝑖

𝑁

𝑖=1 𝑁

𝑖=1 𝑁

∑ 𝑧𝑖

∑ 𝑧𝑖2

[ 𝑖=1

𝑖=1

]

∑ 𝑧𝑖 𝑑𝑖 [ 𝑖=1 ]

The second equation is of the form m=[GTG]-1[GTd] and matches the version given in the text. 4.2 This problem builds on Problem 2.1. Suppose that you determine the masses of 100 objects by weighing the first, then weighing the first and second together, and then weighing the rest in triplets: the first, second, and third; the second, third, and fourth; and so forth.Write a script that (A) randomly assigns masses, 𝑚𝑖𝑡𝑟𝑢𝑒 , to the objects in the range of 0 − 1 kg; (B) builds the appropriate data kernel; 𝐆; (C) creates synthetic observed data, 𝐝𝑜𝑏𝑠 = 𝐆𝐦𝑡𝑟𝑢𝑒 + 𝐧, where 𝐧 is a vector of Normally-distributed random numbers with zero mean and 𝜎𝑑 = 0.01 kg; (D) solves 2 the inverse problem by simple least squares; (E) estimates the variance, 𝜎𝑚 , of each of the 𝑖 estimated model parameters; and (F) counts up the number of estimated model parameters that are within 2𝜎𝑚𝑖 of their true value. (G) Make a plot of 𝜎𝑚𝑖 as a function of the index, 𝑖, of the model parameter. Does it decline, remain constant, or grow? See scripts gdasolnma03_02 and gdasolnpy04_02. I ran the script several time, getting anywhere from 84 to 100 of the model parameters being within 2𝜎𝑚 of their mean (the expected number being 95). The plot of 𝜎𝑚 is shown below; it grows with the index of the model parameter.


Turn static files into dynamic content formats.

Create a flipbook
Solution Manual For Geophysical Data Analysis and Inverse Theory with MATLAB® and Python 5th Edition by AnswerDone - Issuu