From 8f2bff49410cc88fc2b3babd03525cdba6043c4c Mon Sep 17 00:00:00 2001 From: Andrew Lorimer Date: Thu, 3 Jan 2019 13:54:29 +1100 Subject: [PATCH] finish prelim & sampling from 2018 --- spec/prelim.md | 16 +++++++++++++++- spec/sampling.md | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 spec/sampling.md diff --git a/spec/prelim.md b/spec/prelim.md index c01fe95..d158bbb 100644 --- a/spec/prelim.md +++ b/spec/prelim.md @@ -85,4 +85,18 @@ ${(x-h)^2 \over a^2} - {(y-k)^2 \over b^2} = 1$ and ${(y-k)^2 \over b^2} - {(x-h ## Modulus function -$$|x|=\sqrt{x^2}$$ \ No newline at end of file +$$|x|=\sqrt{x^2}$$ + +## Parametric equations + +### Circles +$$\[\begin{cases} + x=a\cos t\\ + y=a\sin t + \end{cases} +\text{where radius} =a$$ + +To convert to cartesian, factorise and use $\cos^2 x + \sin^2 x=1$ + +$\cos^2 t + \sin^2 t = 1$ +$\implies {\cos^2 \over \sin^2 t} + {\sin^2 t \over sin^2 t} = {1 \over \sin^2 t} \implies \csc^2 t - \cot^2 t$ diff --git a/spec/sampling.md b/spec/sampling.md new file mode 100644 index 0000000..2205b4b --- /dev/null +++ b/spec/sampling.md @@ -0,0 +1,40 @@ +# Sampling and Distributions + +**Population** - set of all eligible members +**Sample** - subset of population, may be representative of population +**Random sample** - every element of population has equal chance of selection +**Population proportion $p$** - proportion of individuals in population with an attribute +**Sample proportion $\^p$** - +**Discrete random variable** - countable number of distinct values + +$$\sum \Pr(n)=1$$ + +### Hypergeometric distribution + +$$\Pr(X=x) = {{{\begin{Bmatrix} + D \\ + x \\ + \end{Bmatrix}}\begin{Bmatrix} {N-D} \\ {n-x} \end{Bmatrix} }\over\begin{Bmatrix}N \\ n \end{Bmatrix}}$$ + + +### Generating random numbers +Catalog -> `rand(a,b)` generates a random number between $a$ and $b$ +`randlist(n,a,b)` generates $n$ random numbers between $a$ and $b$ + +### Combinations + +CAS: Advanced -> `nCr(n,r)` $= ^nC_r$ + +### Binomial distributions + +with replacement. + +probability of achieving $x$ successes in $n$ trials for random variable $X$: + +$$\Pr(X=x)=\begin{Bmatrix} n \\ x \end{Bmatrix} p^x (1-p)^{n-x} \quad \text{for }x = 0,1,2, \dots, n$$ + +where $p$ = probability of success on each trial + +#### on CAS: + +`randBin(sample size, p^, no of samples)` \ No newline at end of file -- 2.43.2