Question C.3.6: Consider the data of Example C.3.5. Determine the best-fit v...

Consider the data of Example C.3.5. Determine the best-fit value of the coefficient b in the square-root function

f=b h^{1 / 2}                    (1)

\begin{array}{l|lllllllllll}\text{Height}  h( cm ) & 11 & 10 & 9 & 8 & 7 & 6 & 5 & 4 & 3 & 2 & 1 \\\hline \text{Time}  t( s ) & 7 & 7.5 & 8 & 8.5 & 9 & 9.5 & 11 & 12 & 14 & 19 & 26\end{array}

The 'Blue Check Mark' means that either the MATLAB code/script/answer provided in the answer section has been tested by our team of experts; or the answer in general has be fact checked.

Learn more on how do we answer questions.

First obtain the flow rate data in ml/s by dividing the 250 ml volume by the time to fill:

f=\frac{250}{t}            (2)

Referring to Example C.2.3, whose model is y = bx^m, we see here that y = f , h = x, and m = 0.5. From Equation (1) of Example C.2.3,

b=\frac{\sum_{i=1}^n h_i^{0.5}y_i}{\sum_{i=1}^n h_i}          (3)

The MATLAB program to carry out these calculations is shown next.

% Enter the data.
h = (1:11);
time = [26, 19, 14, 12, 11, 9.5, 9, 8.5, 8, 7.5, 7];
% Compute flow rate from (2).
flow = 250./time;
% Compute b from (3).
b = sum(sqrt(h).*flow)/sum(h)
% Compute f from (1).
f = b*sqrt(h);
% Compute J, S, and r squared.
J = sum((f - flow).ˆ2)
S = sum((flow - mean(flow)).ˆ2)
r2 = 1 - J/S

The result is a=10.4604 and the flow model is f=10.4604 \sqrt{h}. The quality-of-fit values are J = 5.5495, S = 698.2203, and r² = 0.9921, which indicates a very good fit.

Related Answered Questions

Question: C.2.3

Verified Answer:

The least-squares criterion is J=\sum_{i=1}...
Question: C.2.2

Verified Answer:

Subtracting 10 from all the x values and 11 from a...
Question: C.2.1

Verified Answer:

These data do not lie close to a straight line whe...