Colored Equations

Published

October 5, 2022

I had this laying around as a gist and decided to include it here. See the source here:

https://github.com/gfleetwood/gfleetwood.github.io/blob/master/index.Rmd

In particular pay attention to the LaTeX packages in the yaml header (header-includes:).

\(\color{blue}{y} = \color{green}{m}\color{red}{x} + \color{orange}{b}\)

For every one unit change in the independent variable there is a change in the dependent variable plus some offset/bias to represent the value of the dependent variable when the independent variable is zero.

For example, consider a mock linear relationship between a person’s weight in pounds and their height in inches.

\(\color{blue}{Weight} = \color{green}{2}*\color{red}{Height} + \color{orange}{12}\)

This says that it is expected that a person’s weight will increase by 2 pounds for every additional inch in their height. If a person’s height were 0 inches, then their weight would be 12 pounds.

From DataCamp’s Bayesian course

\(P(\color{orange}{\theta}|\color{purple}{D}) = \frac{\color{green}{P(D|\theta)}\times \color{blue}{P(\theta})}{\color{red}{\Sigma{P(D|\theta)} \times P(\theta)}}\)


The probability of different parameter values given some data is the likelihood (The relative probability of the data given different parameter values) multiplied by the prior (The probability of different parameters before seeing the data) divided by the total sum of the likelihood weighted by the prior.