1.02z - Building, comparing and refining function models

1.02z - Building, comparing and refining function models

Turn a practical decision into a function, then test what its predictions mean. In 1.02z you will choose variables, assumptions and a useful domain, compare models with fresh evidence, and make specific refinements when a model stops describing the situation.

Choosing variables assumptions and a domain

A tank contains 2020 litres now and 100100 litres after 88 minutes. Can those two measurements tell you how much water it contains at every other time? A straight line gives a quick prediction, but choosing a straight line already makes an assumption about the filling.

You already know

A linear function has a constant gradient: equal input increases give equal output increases. A function's domain states its permitted inputs; a practical model may need a narrower domain than its algebraic formula.

First specify the purpose: predict volume during filling, rather than water temperature or filling cost. Let tt be time in minutes after filling starts, and V(t)V(t) be volume in litres. The initial volume is known; what remains to model is how it changes.

Function model

A function model is a simplified mathematical description that assigns an output to each permitted input to answer a practical question. Its variables, assumptions and useful domain belong to the model. For example, a constant-rate volume model treats time as continuous. A fractional number of parcels is not a valid input to a model of a parcel count.

An assumption simplifies the situation. Here, constant net inflow means inflow minus outflow remains constant; it does not require there to be no outflow at all.

Constant-rate model

If an output starts at V0V_0 and changes at constant rate rr,

V(t)=V0+rtV(t)=V_0+rt

Use units consistent with tt and restrict the domain to where the constant-rate assumption and physical constraints apply.

Not in the formula sheet: learn it.

The formula is a structure, not evidence that a rate is constant. Fit its parameters from the measurements, then ask whether the structure is sensible.

Worked example 1: constructing a filling model

Question. A 100100-litre tank contains 2020 litres at t=0t=0 and reaches capacity at t=8t=8 minutes. Construct a linear model during these eight minutes, interpret its gradient and predict the volume at t=3t=3.

Plan. Use the initial volume as intercept and the change per minute as gradient.

r=100−208−0=10litres gained per minuteL(t)=20+10t,0≤t≤8fit the two endpointsL(3)=20+10(3)=50interpolate\begin{aligned} r&=\frac{100-20}{8-0}=10 && \text{litres gained per minute} \\ L(t)&=20+10t,\quad0\le t\le8 && \text{fit the two endpoints} \\ L(3)&=20+10(3)=50 && \text{interpolate} \end{aligned}

Why this step? A linear model assumes constant net inflow; the gradient is its physical rate, not just a number attached to tt.

Answer. L(t)=20+10tL(t)=20+10t, for 0≤t≤80\le t\le8, with a constant net inflow of 10 litres min−110\,\mathrm{litres\,min^{-1}}. It predicts 5050 litres at 33 minutes.

Check. L(0)=20L(0)=20 and L(8)=100L(8)=100. These checks confirm the fit, not the assumption of constant flow between the measurements.

Change only the observed filling time: the same tank now takes 1010 minutes to reach capacity. The initial volume and capacity stay fixed.

Worked example 2: changing one observation

Question. With 2020 litres initially and 100100 litres at 1010 minutes, construct the corresponding linear model and predict the volume at 33 minutes.

Plan. Recalculate the rate using the longer time interval.

r=100−2010=8same gain over longer timeL2(t)=20+8t,0≤t≤10state the useful domainL2(3)=20+8(3)=44use the fitted model\begin{aligned} r&=\frac{100-20}{10}=8 && \text{same gain over longer time} \\ L_2(t)&=20+8t,\quad0\le t\le10 && \text{state the useful domain} \\ L_2(3)&=20+8(3)=44 && \text{use the fitted model} \end{aligned}

Why this step? The measured average rate has changed; retaining the old coefficient would no longer fit both observations.

Answer. L2(t)=20+8tL_2(t)=20+8t for 0≤t≤100\le t\le10, assuming constant net inflow of 8 litres min−18\,\mathrm{litres\,min^{-1}}. Its prediction is 4444 litres.

Check. L2(10)=100L_2(10)=100, while the earlier model would give 120120, contradicting the new measurement.

Interpolation uses an input within the measured span; extrapolation goes beyond it. The first formula gives L(12)=140L(12)=140, exceeding the capacity. Its algebraic domain is R\mathbb R, but its useful domain here is only [0,8][0,8].

Counted objects need a discrete domain. A delivery costing £3636 plus £22 per parcel has C(n)=36+2nC(n)=36+2n for integers n≥0n\ge0. Average cost is C(n)/n=36/n+2C(n)/n=36/n+2, for integers n≥1n\ge1; averaging the cost over zero parcels is undefined.

Watch out

Wrong: “The formula accepts t=12t=12, so its prediction is valid.” Right: check the useful domain and capacity. A permissible algebraic substitution can still give an unsupported practical prediction.

Now construct a line from different measurements and say what its coefficient means physically.

Comparing predictions with fresh data

A model should earn your trust on data it was not chosen to fit.

Return to the tank that reaches capacity after 88 minutes. Additional measurements show progressively smaller gains:

tt, minutes0022446688
Volume, litres2020525276769292100100
L(t)=20+10tL(t)=20+10t2020404060608080100100

Try Q(t)=a+bt+ct2Q(t)=a+bt+ct^2. Fitting the observations at 0,4,80,4,8 gives

a=20initial measurement4b+16c=56measurement at t=48b+64c=80measurement at t=832c=−32  ⟹  c=−1subtract twice the second lineb=18substitute back\begin{aligned} a&=20 && \text{initial measurement} \\ 4b+16c&=56 && \text{measurement at }t=4 \\ 8b+64c&=80 && \text{measurement at }t=8 \\ 32c&=-32\implies c=-1 && \text{subtract twice the second line} \\ b&=18 && \text{substitute back} \end{aligned}

Thus Q(t)=20+18t−t2Q(t)=20+18t-t^2. It also predicts 5252 and 9292 at the other tabulated times.

Linear and quadratic tank-volume models compared with measurements over eight minutes

There are infinitely many curves through the same two endpoints. In fact, 20+10t+kt(t−8)20+10t+kt(t-8) gives 2020 at t=0t=0 and 100100 at t=8t=8, for every real kk, yet gives 60−16k60-16k at t=4t=4. The midpoint prediction can be any real number before physical restrictions are imposed. Two endpoint checks alone tell you remarkably little about the curve between them.

Residual

A residual is observed output minus predicted output. For example, an observation of 8484 against a prediction of 8585 has residual −1-1: the model overpredicts by 11. A small signed total of residuals is not necessarily a good fit because positive and negative errors may cancel.

To compare numerical errors, choose a stated criterion. Squared residuals treat errors in opposite directions symmetrically and give larger errors more weight.

Sum of squared residuals

For observations oio_i and corresponding predictions pip_i,

S=∑i=1n(oi−pi)2S=\sum_{i=1}^{n}(o_i-p_i)^2

Compare models on the same observations and units. A smaller value means a closer fit by this criterion, not proof that the assumptions are true.

Not in the formula sheet: learn it.

Keep fresh observations separate from those used to fit either model. They test prediction rather than the ability to pass through chosen points.

Worked example 3: testing the models on fresh measurements

Question. Fresh measurements are 6565 litres at t=3t=3 and 8484 litres at t=5t=5. Compare L(t)=20+10tL(t)=20+10t and Q(t)=20+18t−t2Q(t)=20+18t-t^2 using squared residuals.

Plan. Evaluate both models at the two fresh times and square observed-minus-predicted differences.

L(3)=50,L(5)=70linear predictionsQ(3)=65,Q(5)=85quadratic predictionsSL=(65−50)2+(84−70)2=421same fresh dataSQ=(65−65)2+(84−85)2=1same criterion\begin{aligned} L(3)&=50,& L(5)&=70 && \text{linear predictions} \\ Q(3)&=65,& Q(5)&=85 && \text{quadratic predictions} \\ S_L&=(65-50)^2+(84-70)^2=421 && \text{same fresh data} \\ S_Q&=(65-65)^2+(84-85)^2=1 && \text{same criterion} \end{aligned}

Why this step? Testing on fresh data avoids claiming success merely because the parameters were chosen to reproduce the observations.

Answer. QQ fits these fresh observations much better by this criterion, since 1<4211<421. This supports using it within the observed filling period; it does not justify unlimited extrapolation.

Check. The linear residuals 15,1415,14 are both large and positive. The quadratic residuals 0,−10,-1 agree with the much smaller squared total.

Change just the last fresh measurement from 8484 to 8686 litres. This tests how the conclusion responds to a small change in the evidence.

Worked example 4: sensitivity to a changed measurement

Question. Repeat the comparison with fresh observations 6565 litres at t=3t=3 and 8686 litres at t=5t=5.

Plan. Retain the model predictions and update only the changed residual.

SL=(65−50)2+(86−70)2=481updated linear errorSQ=(65−65)2+(86−85)2=1updated quadratic error\begin{aligned} S_L&=(65-50)^2+(86-70)^2=481 && \text{updated linear error} \\ S_Q&=(65-65)^2+(86-85)^2=1 && \text{updated quadratic error} \end{aligned}

Why this step? A residual of 11 and a residual of −1-1 have the same square; changing an error's direction need not change its contribution to this criterion.

Answer. The quadratic is still preferred on these data: 1<4811<481. This conclusion is stable under this particular measurement change, but further evidence could change it.

Check. The quadratic's second residual has changed from −1-1 to 11; both square to 11.

A spreadsheet output can show times, observations, predictions and residuals in separate columns, with a scatter plot using numerical time horizontally. Interpret the output rather than trusting the appearance: at t=5t=5, an observed value 8484, prediction 8585 and displayed residual −1-1 are consistent. A displayed residual 11 signals the opposite subtraction convention, not a different prediction; its square remains 11. Recomputing after a parameter change should update every prediction and residual. Rounded columns, a coarse time grid or a narrow axis scale can hide discrepancies. This is a way to investigate models, not evidence that their assumptions hold.

Watch out

Wrong: add the residuals 22 and −2-2 and conclude there is no error. Right: their sum of squares is 22+(−2)2=82^2+(-2)^2=8. Cancellation hides errors; it does not remove them.

The next comparison supplies predictions directly, so focus on the criterion and the conclusion it supports.

Responding to limits and changing assumptions

A close fit during filling does not tell you what happens after the tank is full.

For Q(t)=20+18t−t2Q(t)=20+18t-t^2, completing the square gives Q(t)=101−(t−9)2Q(t)=101-(t-9)^2. It predicts 101101 litres at 99 minutes and then a falling volume. That is impossible for a 100100-litre tank whose filling stops at capacity and which has no later outflow.

Assumption, limitation and refinement

An assumption is a simplification used to build a model, such as constant net inflow. A limitation is a restriction on how reliably it describes the situation, such as missing observed slowing. A refinement changes a stated assumption, functional form or useful domain to address a particular limitation. “Make it more accurate” alone is not a refinement.

A capacity rule gives a concrete improvement. The formula must change when the process changes; fitting an ever more complicated curve to earlier data cannot supply missing information about later behaviour.

Worked example 5: stopping at capacity

Question. The tank follows Q(t)=20+18t−t2Q(t)=20+18t-t^2 until it first reaches 100100 litres. Filling then stops, and no water enters or leaves. Refine the model for t≥0t\ge0 and predict the volume at t=12t=12.

Plan. Find the first capacity time and use a constant piece afterwards.

20+18t−t2=100find the change of processt2−18t+80=(t−8)(t−10)=0solve for capacityt=8choose the first time\begin{aligned} 20+18t-t^2&=100 && \text{find the change of process} \\ t^2-18t+80&=(t-8)(t-10)=0 && \text{solve for capacity} \\ t&=8 && \text{choose the first time} \end{aligned}

Why this step? The later algebraic root 1010 belongs to an extension of the old quadratic after the process has already changed; it is not a second filling time.

Answer.

V(t)={20+18t−t2,0≤t≤8100,t>8V(t)=\begin{cases}20+18t-t^2,&0\le t\le8\\100,&t>8\end{cases}

It predicts V(12)=100V(12)=100 litres, rather than the unrefined Q(12)=92Q(12)=92.

Check. At t=8t=8, both pieces give 100100. The refinement respects capacity and the stated absence of later flows.

Change only the post-filling assumption. A leak now removes 22 litres per minute after filling stops, continuing at that rate until the tank is empty.

Worked example 6: refining the later process

Question. Keep the same filling model, but add the stated leak after t=8t=8. Refine the model for t≥0t\ge0 and predict the volume at t=12t=12.

Plan. Measure leakage time from t=8t=8, then stop the loss when volume reaches zero.

V(t)=100−2(t−8)after filling stops100−2(t−8)=0  ⟹  t=58find emptying timeV(12)=100−2(12−8)=92four minutes of leakage\begin{aligned} V(t)&=100-2(t-8) && \text{after filling stops} \\ 100-2(t-8)&=0\implies t=58 && \text{find emptying time} \\ V(12)&=100-2(12-8)=92 && \text{four minutes of leakage} \end{aligned}

Why this step? The leak has run for t−8t-8 minutes, not tt minutes. Using 100−2t100-2t would start the loss too early.

Answer.

V(t)={20+18t−t2,0≤t≤8100−2(t−8),8<t≤580,t>58V(t)=\begin{cases}20+18t-t^2,&0\le t\le8\\100-2(t-8),&8<t\le58\\0,&t>58\end{cases}

It predicts 9292 litres at 1212 minutes, under the constant-leak assumption.

Check. At t=8t=8 the first two rules agree at 100100; at t=58t=58 the last two agree at 00. No predicted volume is negative.

These piecewise rules are constructed from the assumptions; they are not supplied formulas to memorise. The leaking refinement happens to agree with QQ at t=12t=12, but one matching prediction does not validate the quadratic's later behaviour. Measure after filling to test the leak rate. If loss slows as the tank empties, replace the constant-rate assumption too.

Prefer a simple model adequate for the decision. More parameters can fit measurement noise, and a good fit cannot rescue a physically impossible prediction.

Watch out

Wrong: “Use the quadratic for all time because its fresh residuals are small.” Right: check capacity, non-negative volume and the process after filling. The useful domain and the assumptions limit what the fit supports.

An explanation should identify how the model's prediction conflicts with the situation. Here Q(9)=101Q(9)=101 directly conflicts with a capacity of 100100 litres; merely calling the model “unrealistic” leaves that reason unstated.

Exam tip

For an OCR limitation question, connect a model feature to the context: name the change in rate or physical constraint that the model fails to represent. A large-looking answer alone does not explain a limitation.

Apply the capacity idea to a different linear filling model, without adding an unsupported later process.

Turning a decision into a checked model

A practical question often hides the choice of what to model. For a fundraising trip, income alone will not answer whether the trip meets its target: you need income minus costs.

Specify and analyse the decision first. Then collect relevant information, process and represent it mathematically, and interpret the result in context. If a check reveals missing information or a failed assumption, repeat the cycle. These stages do work: they decide what data to collect, what equations to build and whether an answer can actually be used.

Surplus model

If income is I(n)I(n) and cost is C(n)C(n),

S(n)=I(n)−C(n)S(n)=I(n)-C(n)

State the permitted values of nn, including whole-number and capacity restrictions. A target surplus TT requires S(n)≥TS(n)\ge T.

Not in the formula sheet: learn it.

The following decision requires a supplier's price, a ticket price and capacity. Booking demand would be another essential measurement before committing money, even if the algebra says the target is achievable.

Worked example 7: a minimum booking threshold

Question. A charity wants a trip to raise at least £150150. A coach costs £240240 plus £88 per passenger. Tickets cost £2020, and there are 4040 seats. Determine the minimum number of paid passengers, stating assumptions.

Plan. Construct surplus, solve the target inequality, then test the neighbouring integer bookings and capacity.

Assume every passenger pays, the quoted costs are complete, and there are no refunds or free seats. Let nn be the number of paid passengers, an integer with 0≤n≤400\le n\le40.

I(n)=20n,C(n)=240+8nrepresent the collected pricesS(n)=20n−(240+8n)=12n−240income minus cost12n−240≥150  ⟹  n≥32.5impose the target\begin{aligned} I(n)&=20n,& C(n)&=240+8n && \text{represent the collected prices} \\ S(n)&=20n-(240+8n)=12n-240 && \text{income minus cost} \\ 12n-240&\ge150\implies n\ge32.5 && \text{impose the target} \end{aligned}

Why this step? A minimum booking count must be rounded upwards to an allowed integer; 32.532.5 is a threshold, not a possible attendance.

Answer. At least 3333 paid passengers are required. This is within the 4040-seat capacity, under the stated cost and payment assumptions.

Check. S(32)=144<150S(32)=144<150, while S(33)=156≥150S(33)=156\ge150. These checks establish the minimum, but do not establish that 3333 people will book.

Repeat the cycle when information changes. Alter only the fixed cost: the supplier now discloses an additional £3030 booking fee.

Worked example 8: new information changes the decision

Question. With all other conditions unchanged, determine the revised minimum bookings after the £3030 fee is included.

Plan. Revise the fixed cost, then solve and check the same decision again.

C(n)=270+8nupdate the complete quoteS(n)=20n−(270+8n)=12n−270rebuild surplus12n−270≥150  ⟹  n≥35revise the threshold\begin{aligned} C(n)&=270+8n && \text{update the complete quote} \\ S(n)&=20n-(270+8n)=12n-270 && \text{rebuild surplus} \\ 12n-270&\ge150\implies n\ge35 && \text{revise the threshold} \end{aligned}

Why this step? The omitted fee changes the fixed cost, not the income per passenger; correcting the responsible assumption avoids changing unrelated parts of the model.

Answer. The revised minimum is 3535 paid passengers, still within capacity.

Check. S(34)=138<150S(34)=138<150 and S(35)=150S(35)=150. Ask for the supplier's complete quote and check likely paid demand before using this booking threshold.

A failed feasibility check is useful information. It sends you back to revise a price, capacity or cost assumption, then calculate again; it is not a reason to round an inconvenient answer down. This completes a second cycle: new information, revised representation, new result and a fresh contextual check.

The tank question follows the same logic. Two measurements give a line only after a constant-rate assumption. Intermediate observations support a curved model, and capacity changes what happens next. More arithmetic cannot replace the missing observations or assumptions.

Watch out

Wrong: “The minimum is 3636, but there are only 3535 places, so use 3535.” Right: the target is infeasible under those conditions. Specify and check a change before claiming the target can be reached.

Make a decision where capacity blocks the target, then propose a numerically workable refinement.

Quick Recap

  • Define the decision, variables, units, assumptions and useful domain before relying on a formula.
  • Test predictions on fresh observations; a small error on fitted points is weak evidence.
  • Compare models using a stated criterion, then check physical constraints and practical meaning.
  • Refine the assumption or rule responsible for a failure, and repeat the problem-solving cycle.

Two tank measurements do not determine every intermediate or later volume: a line requires constant net inflow, fresh data test that assumption, and capacity or leakage requires a new rule.