SCIE1000 EOS Exam Notes PDF
Document Details
![MeticulousRutherfordium3510](https://quizgecko.com/images/avatars/avatar-10.webp)
Uploaded by MeticulousRutherfordium3510
University of Queensland
Tags
Summary
These notes cover various mathematical functions and their applications, including binary classification tests and the SIR model. Different types of equations are explained.
Full Transcript
## Summary The following table contains all of the named equations (in bold) for binary classification tests used in these modules, along with some expressions that can help you to construct other equations. | Expression | Information | |:---|:---| | A | True Positives - the number of samples co...
## Summary The following table contains all of the named equations (in bold) for binary classification tests used in these modules, along with some expressions that can help you to construct other equations. | Expression | Information | |:---|:---| | A | True Positives - the number of samples correctly classified as positive | | B | False Positives - the number of samples falsely classified as positive | | C | False Negatives - the number of samples falsely classified as negative | | D | True Negatives - the number of samples correctly classified as negative | | N | The total number of samples (N=A+B+C+D) | | A+B | The number of samples that tested positive | | C+D | The number of samples that tested negative | | A+C | The number of samples with the condition | | D+B | The number of samples without the condition | | (A+D)/N | Accuracy - the proportion of correctly classified samples out of the total population | | A/(A+C) | Sensitivity - the proportion of all samples with the condition that are correctly classified | | D/(B+D) | Specificity - the proportion of all samples without the condition that are correctly classified | | (A+C)/N | Prevalence - the proportion of samples with the condition out of the total population | | (B+D)/N | The proportion of samples without the condition out of the total population | ## A problem with units - diving deeper You might have asked yourself what are the units of each of the constants in the general form for the power function: $y(x) = Mx^p + c$ The constant c will clearly have the same units as y, and the power p must be unitless. But what about M? To see what the units would be, consider an alternative definition of the power function $y(x) = N(\frac{x}{x_0})^p +c$ where N and $x_0$ are constants. Now we can see that $x_0$ must have the same units as $x$ and N must have the same units as y. We can therefore see how the units of M are formed by noting that $M = \frac{N}{x_0^p}$ ## General form We could work with the power law form that has the constants N and $x_0$ rather than form originally introduced. However this means we would be using an equation with an extra constant, which is unnecessary when we are looking to use the power law to model experimental data. Putting it all together, we can introduce a sine wave with the general form $y(t) = Asin[\frac{2\pi}{P}(t - S)] + E$ The constants in this equation are: - A: the amplitude of the sine wave - P: the period of the wave - S: the shift right of the wave - E: the equilibrium value The value of each of these constants is set by the physical situation being considered. ## SIR models SIR models typically have three different groups: - **S** - The number of people who are susceptible to the disease. This means that they have the potential to be infected with the disease. - **I** - The number of people who currently have the disease. - **R**- The number of people who have recovered from the disease. This group is sometimes used to include people who are immune to the disease for other reasons, such as vaccinations. There is also N, the total population. This is the sum of all the people in each group: N=S+I+ R. ## Derivative The derivative can tell you a lot about the behaviour of a function. For example, if the derivative of f at a point is positive, then we know that f is increasing at that point. Here are some handy things to remember about derivatives: - If the derivative is positive at $x$, then f(x) is increasing at that point. - If the derivative is negative at $x$, then f(x) is decreasing at that point. - If the derivative is equal to 0 at $x$, then this could mean that there is a critical point at $x$, such as a maximum or minimum (unless f is a constant function of the form f(x) = c). - If the derivative is a constant for all values of $x$, such as f'(x) = c, then we know that f is a linear function. ## Understanding Logistic DEs The are two constants in the equation introduced in the video, r and K. Here are some important things to remember about these constants, as discussed in the video: - **r** - the unconstrained growth rate - A lower r value means that the function will grow slowly - A higher r value means that the function will grow quickly - When N is much closer to 0 than it is to K, the function will behave similar to an exponential function with a growth rate of r - **K**-the carrying capacity - The K value is the asymptote for the function. If N starts as a value other than K, then the function will approach K, but never quite reach it - When N is lower than K, the derivative is positive, so the function will rise - When N is higher than K, the derivative is negative, so the function will fall - When N is exactly K, the derivative is 0, so the function will stay steady - at the asymptote - When N is exactly K/2, the derivative will be at its maximum value, so the steepest slope occurs at N = K/2 - When N is lower than K/2, the function will be increasing at an increasing rate - When N is higher than K/2, the function will be increasing at a decreasing rate ## Euler's Method Euler's method is used when you want to model the behaviour of a system over time, but the only useful equations you have are the differential equations. Euler's method works by finding the tangent to the line (using the differential equation), and taking a small step along that line to approximate a new value. Here is the equation for Euler's method: $y(t + h) = y(t) + hy'(t)$ where: - $y(t + h)$ is the approximation for the value of y at $t + h$. - $y'(t)$ is the derivative of y at t, - $y(t)$ is the y value at t, - h is the step size. ## Lotka-Volterra Model A Lotka-Volterra model will typically have two groups, as follows: - **P**-Predators. These animals compete with each other to eat the prey animals. - **Q**-Prey. These animals are eaten by the predator animals. Often times, the variables used to represent P and Q are changed to better suit the context of the question. For example, the terms F and I were used in the video, because they were referring to frogs and insects. The following equation is the basic model used for Lotka-Volterra equations. However, you may come across variations, such as one with a carrying capacity for the prey group. $Q' = aQ - bPQ$ $P'=cP+dPQ$ There are four constants in these equations: a, b, c, and d. Here is a brief explanation for the purpose of these constants: - **a** - This represents the natural growth of the prey population, without taking into account predator-prey interactions. - **b** - Prey are eaten by predators, so this constant represents the effect of this interaction on the prey population. - **c**- Predators compete with each other for their limited food source, so this constant represents the reduction in predator population due to this competition. - **d** - Predators use the prey as their main food source, so this constant represents the effect of this interaction on the predator population. ## Binary Classification Tables Below are the four different possibilities when using a binary classification test, labelled A to D: - **A** - The sample is correctly classified as positive. Also known as a **True Positive**. - **B**- The sample is negative (does not have the condition), but has been falsely classified as positive. Also known as a **False Positive**. - **C**-The sample is positive (has the condition), but has been falsely classified as negative. Also known as a **False Negative**. - **D**- The sample is correctly classified as negative. Also known as a **True Negative**. These can be arranged into a binary classification table: | Condition | | |:---|:---| | Yes | No | | Test +ve | A | B | | Test-ve | C | D | ## Logarithms Suppose we have an exponential function of the form $y(x) = a^x$ The inverse function of the exponential is called the logarithm (or log for short), defined as $x(y) = log_a(y)$ To finish this section, we note that there are two useful rules for manipulating logarithmic functions (independent of base). - $log_a(x)^n = nlog_a(x)$ - $log_a(xy)= log_a(x) + log_a(y)$ ## Linear Functions Linear functions show up in science either directly through a linear relationship between two parameters, or indirectly after data has been "linearised". Mathematically, we can introduce a linear function with the general form $y(x) = mx + c$ where x is the independent variable and y is the dependent variable. The constants in this expression are: - **m**, which is the slope - **c**, which is the y-intercept ## Power Functions Mathematically, we can introduce a power function with the general form $y(x) = Mx^p +c$ where x is the independent variable and y is the dependent variable. The constants in this expression are: - **M**, which scales the vertical height - **p**, which is the power which controls the rates of change - **c**, which is the y-intercept which shifts the graph up or down ## Surge Function The surge function is used to model a paramater that increases from zero to some maximum value, and then decreases in a similar way to a decreasing exponential, eventually approaching zero. An example where a surge function might be used to model a physical process is in the intake of a drug. The drug initially disperses through the body and the concentration in the blood increases. As the body works to remove the drug, the concentration decreases. We can introduce a surge function with the general form $f(t) = at^pe^{-bt}$ where t is generally used as the time, and a, p and b are constants which depend on the context in which the function is being applied. We see that it is effectively the combination of two functions, a power function and a negative exponential. The power function dominates at early times, while the influence of the exponential decay becomes more significant at larger times. ## Terminology There are multiple ways to write a function's derivative. Given a function written as $f(x) = x^2$ or $y = x^2$, the derivative can be written as follows: - $f'(x) = 2x$ - $y' = 2x$ - $\frac{dy}{dx} = 2x$ ## Newton's Method Newton's method is used to find where a function is equal to zero, especially when it is difficult to solve the problem using algebra. To approximate where $f(x) = 0$, the following formula is applied iteratively: $x_{i+1} = x_i - \frac{f(x_i)}{f'(x_i)}$ We can use derivatives to find the tangent line to a curve at a particular point. The tangent line to a curve f at a point $x$ is a linear func where $x_i$ is the current guess, and $x_{i+1}$ is the next guess. as $f'(x)$, that passes through the point $(x, f(x))$. ## Measurement | SI Units used | | |:---|:---| | length | Metres (m) | | mass | Kilogram (kg) | | time | Seconds (s) | | Electric current | Ampere (A) | | Thermodynamic temperature | Kelvin (k) | | Amount of substance | Mole (m) | | Luminous intensity | Candela (ed) | ## Derivatives When talking about derivatives, we say that the derivative of f(x) is the change in f(x) with respect to x. The derivative can tell you a lot about the behaviour of a function. For example, if the derivative of f at a point is positive, then we know that f is increasing at that point. Here are some handy things to remember about derivatives: - If the derivative is positive at $x$, then $f(x)$ is increasing at that point. - If the derivative is negative at $x$, then $f(x)$ is decreasing at that point. - If the derivative is equal to 0 at $x$, then this could mean that there is a critical point at $x$, such as a maximum or minimum (unless f is a constant function of the form f(x) = c). - If the derivative is a constant for all values of $x$, such as $f'(x) = c$, then we know that f is a linear function. - **Constants**, The general form for an exponential function is $y(x) = Ca^x$ The three constants in this expression are: - **C**: is a scaling factor - **a**: is called the base of the exponential - **k** is called the growth or decay rate (depending on whether k is greater than or less than zero, respectively) - **A "log-lin" plot** means that, instead of plotting "y" on the vertical axis, we take the logarithm of y (usually to the base e), and plot this against x. Why is this useful? Consider an exponential function of the form $y = Ce^{kx}$ If we take the natural logarithm of both sides, and expand using the rules above, then we can write $ln(y) = ln(Ce^{kx})$ $= ln(C) + ln(e^{kx})$ $= ln(C) + kxln(e)$ $= ln(C) + kx$ because $ln(e) = 1$ For an exponential function, a plot of $ln(y)$ against x will be a straight line with a slope of k and a y-intercept of $ln(C)$.