# Modelling with functions

> IB Mathematics AI HL · IB AI HL Unit 2: Functions
> Source: https://www.owlsprep.com/study/ib-math-ai-hl-u2-modelling-with-functions/

This subtopic covers constructing and interpreting function models for real-world phenomena. You will learn to match data patterns to appropriate function types, fit parameters, interpret results, and evaluate how well your model describes its context.

**Prerequisites:** [Properties of polynomial functions](https://www.owlsprep.com/study/ib-math-ai-hl-u2-polynomial-functions/); [Exponential and logarithmic functions](https://www.owlsprep.com/study/ib-math-ai-hl-u2-exponential-logarithmic-functions/)

## Learning objectives

- Select appropriate function types for real-world modelling scenarios based on context
- Fit function regression models to given data using graphing technology
- Interpret model parameters in the context of the original problem
- Assess the validity of a model and the reliability of predictions

## Selecting the Right Function Type

The first step in any modelling problem is identifying which family of functions matches the trend and expected behavior of your data. You can identify this by plotting the data and matching its shape to known function behaviors.

**Function Model** — A mathematical function constructed to approximate the behavior of a real-world phenomenon, with parameters adjusted to fit observed data.

- Linear models: Constant rate of change, straight line trend
- Quadratic models: Single turning point, constant acceleration
- Exponential models: Constant proportional growth/decay
- Logistic models: Growth that levels off at a carrying capacity
- Trigonometric models: Periodic repeating behavior

**Worked example:** A barista records the temperature of a cooling latte over 20 minutes. The temperature decreases toward room temperature, with the rate of decrease slowing over time. What function type is most appropriate for this model?

1. Identify the key behavior: temperature decreases and approaches a horizontal asymptote at room temperature
2. Compare to common function types: exponential decay approaches a constant asymptote, which matches the observed behavior
3. Eliminate inappropriate options: linear would decrease at a constant rate (and eventually go below room temperature), quadratic has a turning point, and trigonometric is periodic, so none fit

*Conclusion:* An exponential decay model is the best choice for this scenario

> **Exam tip:** Always plot your data first before choosing a model; visual inspection eliminates most unsuitable options immediately.

## Fitting Models to Data

For IB AI HL, you will almost always use your graphing display calculator (GDC) or other technology to fit a regression model to a set of data points. The process follows a standard, repeatable structure.

1. Enter your independent and dependent data into two separate lists on your GDC
2. Select the pre-determined appropriate function type from the regression menu
3. Record the fitted parameter values and the coefficient of determination $R^2$

**Coefficient of Determination** — A statistic that measures how much variation in the dependent variable is explained by the model. Values range from 0 to 1, with values closer to 1 indicating a better fit.

*Notation:* R^2

**Worked example:** The following data gives the height of a plant (cm) after $x$ weeks: $(1, 3.1), (2, 5.2), (3, 8.9), (4, 15.1), (5, 26.3)$. Fit an exponential model of the form $h = ab^x$ to this data.

1. Enter $x$ values into list L1 and $h$ values into list L2 on your GDC
2. Select exponential regression from the statistics menu
3. Record the output parameters: $a \approx 1.82$, $b \approx 1.65$
4. Write the final fitted model:
5. $$h = 1.82(1.65)^x$$

*Calculator:* allowed

## Interpreting Parameters and Predictions

Once you have a fitted model, you need to interpret the meaning of each parameter in context, and use the model to predict values for inputs not in your original data.

> **info**
>
> There are two types of predictions: interpolation (predicting within the range of your original data) which is generally reliable, and extrapolation (predicting outside the original range) which can be unreliable if the behavior of the phenomenon changes outside your data range.

**Worked example:** For the exponential plant growth model $h = 1.82(1.65)^x$, interpret the parameter $b$ and predict the height after 6 weeks.

1. Recall that for $y = ab^x$, $b$ is the growth factor per unit of $x$
2. Context interpretation: $x$ is time in weeks, so $b=1.65$ means the plant's height increases by 65% (a factor of 1.65) each week
3. Substitute $x=6$ into the model to get the prediction:
4. $$h = 1.82(1.65)^6 \approx 35.0$$
5. The predicted height after 6 weeks is approximately 35 cm. This is extrapolation (beyond the original data range of 1-5 weeks), so it should be treated as approximate.

## Assessing Model Validity

No model is perfect; you always need to assess whether your model is appropriate for the context you are studying, even if it has a high $R^2$ value.

- Check the $R^2$ value: values above 0.9 usually indicate a very good fit
- Plot the fitted curve over your data points to check for systematic deviations
- Check if the model makes long-term sense in context

**Worked example:** A researcher fits a linear model to world population data from 1900 to 2000, getting an $R^2$ value of 0.98. Why is this model still likely invalid for predicting 2100 population?

1. Recall that linear models predict constant rate of growth forever, with no upper limit
2. Context knowledge: the Earth has finite resources, so population growth will eventually slow and level off
3. The linear model fits the 1900-2000 range well, but extrapolating to 2100 ignores real-world resource constraints

*Conclusion:* A logistic model, which includes a carrying capacity asymptote, would be more appropriate for long-term population predictions.

## Common pitfalls

- **Wrong:** Treating extrapolated predictions as equally reliable as interpolated predictions
  - Why it fails: Extrapolation assumes the trend observed in the original data continues outside that range, which is often not true
  - Correct: Always note when a prediction is extrapolation, and comment on its potential unreliability in your answer
- **Wrong:** Choosing a function type based only on high $R^2$ without checking context
  - Why it fails: Higher-order polynomials can always get a higher $R^2$ by overfitting to random noise, but will not make sense in context
  - Correct: First select function types based on expected behavior from context, then compare $R^2$ between contextually appropriate options
- **Wrong:** Forgetting to interpret parameters in context, only stating their numerical values
  - Why it fails: Exam questions explicitly ask for context interpretation, and you will lose marks for only giving numbers
  - Correct: Always link the parameter to the variables in the problem, including units where appropriate
- **Wrong:** Ignoring impossible outputs from a model (e.g. negative temperature)
  - Why it fails: Most models are only valid for a restricted domain of inputs
  - Correct: Always state the domain of validity for your model, and discard impossible outputs as invalid

## Cheatsheet

| Function Type | Common Use Case | Standard Form |
| --- | --- | --- |
| Linear | Constant rate of change | $y = mx + c$ |
| Quadratic | Single turning point / constant acceleration | $y = ax^2 + bx + c$ |
| Exponential | Proportional growth/decay | $y = ab^x$ |
| Logistic | Growth leveling off at carrying capacity | $y = \frac{L}{1 + ke^{-rx}}$ |
| Trigonometric | Periodic repeating behavior | $y = a\sin(bx + c) + d$ |

## What's next

Modelling with functions is a core transferable skill throughout IB Mathematics AI HL, and it appears in every major topic from statistics to calculus to kinematics. The skills you learn here — selecting appropriate models based on context, fitting parameters to observed data, interpreting results, and assessing validity — will be applied repeatedly when solving real-world problems across the entire syllabus. Modelling also forms the basis for many extended essay and internal assessment projects in IB Math, so mastering these foundations will pay off for your coursework as well as your exams.

- [Geometry and trigonometry](https://www.owlsprep.com/study/ib-math-ai-hl-u3-overview/)
- [2D and 3D coordinate geometry](https://www.owlsprep.com/study/ib-math-ai-hl-u3-2d-and-3d-coordinate-geometry/)
- [Right triangle trigonometry](https://www.owlsprep.com/study/ib-math-ai-hl-u3-right-triangle-trigonometry/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-ai-hl-u2-modelling-with-functions/
