# Stats - Coding

> Source: https://ollybritton.com/notes/a-level/maths/topics/coding/ · Updated: 2020-10-22 · Tags: stats

##### How would a mean height change if everyone stood on chairs??
It would increase by the height of the chairs.

##### How would a standard deviation for height change if everyone stood on chairs??
It would not change.

##### How would a mean height change if everyone was 3 times taller??
It would be 3 times bigger.

##### How would a standard deviation for height change if everyone was 3 times taller??
It would be 3 times bigger.

##### How would a variance for height change if everyone was 3 times taller??
It would be 9 times bigger.

##### Why do we use coding??
In order to transform our data into something that can be worked with more easily.

##### Once you've used coding to transform data and calculate values, what must you do??
Convert the values back.

##### In a measurement of heights $h$, the values are coded by subtracting $2$ and dividing by $3$. How could you write the new heights $c$??
$$
c = \frac{h - 2}{3}
$$

##### What is the general coding formula??
$$
y = \frac{x - a}{b}
$$

##### If $y = \frac{x - a}{b}$, then what is $\overline{y}$??
$$
\frac{\overline{x} - a}{b}
$$

##### If $y = \frac{x - a}{b}$, then what is $\sigma_y$??
$$
\frac{\sigma_x}{b}
$$

##### In the context of coding, what is $a$ and $b$ in $y = \frac{x - 1000}{10}$??
* $a = 1000$
* $b = 10$

##### Before coding $\overline{x} = 11$. After using $y = \frac{x + 10}{3}$, what is $\overline{y}$??
$7$.

##### After coding using $y = 3x - 20$, the $\sigma_y$ was $12$. What was the original $\sigma_x$??
$4$.

---
Olly Britton — https://ollybritton.com. Machine-readable index: https://ollybritton.com/llms.txt
