Download here

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Forecasting wikipedia , lookup

Linear regression wikipedia , lookup

Bias of an estimator wikipedia , lookup

Regression analysis wikipedia , lookup

Expectation–maximization algorithm wikipedia , lookup

German tank problem wikipedia , lookup

Choice modelling wikipedia , lookup

Data assimilation wikipedia , lookup

Regression toward the mean wikipedia , lookup

Coefficient of determination wikipedia , lookup

Transcript
EGR 599
Advanced Engineering Math II
_____________________
LAST NAME, FIRST
Problem set #6
1. (Chapra1 P. 17.6) Use least-squares regression to fit a straight line, y = a + bx, to
x
y
2
9
3
6
4
5
7
10
8
9
9
11
5
2
5
3
(a) Along with the slope and intercept, compute the standard error of the estimate and the
correlation coefficient. Plot the data and the straight line. Assess the fit.
(b) Recompute (a), but use polynomial to fit a parabola, y = a + bx + cx2, to the data. Compare
the results with those of (a).
2. (Chapra P. 17.13) Given the data
x
y
5
16
10
25
15
32
20
33
25
38
30
36
35
39
40
40
45
42
50
42
use least-squares regression to fit
(a) a straight line, y = a + bx,
(b) a power equation, y = axb,
(c) a saturation-growth-rate equation, y = a
x
, and
b x
(d) a parabola, y = a + bx + cx2.
Plot the data along with all the curves in (a), (b), (c) and (d). Is any one of the curves superior? If
so, justify.
(e) Use nonlinear regression to fit a saturation-growth-rate equation, y = a
x
, to the data.
b x
3. (Rowley, R.L.2, P. 7.2) Use an MC (Monte Carlo) method to compute the area of a regular
hexagon inscribed in a circle of radius 5.
4. (Rowley, R.L., P. 7.3)
(a) Estimate the integral F =
1

0
xe x dx using the sample mean MC method and 4000 trials. Your
program should also compute the standard deviation from
=
 F 2    F 2
where
<F> =
1
2
1
n
n
 f (x )
i 1
i
and
<F2> =
1
n
n
f
i 1
2
( xi )
Chapra and Canale, Numerical Methods for Engineers , Mc-Graw Hill, 4 th Edition, 2002
Rowley, R.L., Statistical Mechanics for Thermophysical Property Calculations, Prentice Hall, 1994
(b) The standard deviation computed above does not decrease with increasing n. Another
estimate of the reliability of the MC-estimated value of F is from a standard deviation of mean
values obtained from multiple simulations. Repeat the simulation of part (a) 19 more times and
average the resultant values of F. From these 20 mean values compute m, the standard deviation
of the means
m =
 F 2    F 2
(1)
m can be estimated from a single run with the approximate relation
m = /201/2
(2)
Compare the value of m computed from equations (1) and (2).
(c) Analytically determine the integral in part (a) and compare the exact result to the simulated
result. Do you feel  or m is a better estimator of the standard deviation of a simulation run.
5. (Rowley, R.L., P. 7.4) Using importance sampling, compute the integral F =
1
 xe
0
x
dx using
500, 1000, 5000, and 10,000 trials. Use P (x) = ax1/2 for the probability distribution function.
6. (Rowley, R.L., P. 7.5) Compute the integral F =
 x 
1
 cos 2  dx
0
(a) using a uniform random number generator and (b) using importance sampling with
P (x) =
3
(1  x2)
2
for the probability distribution function. Use the same number of trials in the two cases and
compare the variances (the square of the standard deviation).
7. (Rowley, R.L., P. 7.6) Consider the object shown below which has been machined from a
piece of material of uniform density. Find the center of mass of the object.
12
4
6
4