How do I show that for any set of n measurements, the fraction included in the interval y(bar) - ks to y(bar) + ks is atleast 1 - 1/k^2 I'm having trouble showing this. 
It says: let k be greater than or equal to 1. Show that for any set of n measurements, the fraction included in the interval y(bar) - ks to y(bar) + ks it atleast $1 - 1/k^2$. y(bar) is the mean.
The problem gives a hint:
$s^2 = 1/(n-1)[sum(y - y(bar))^2]$. In this expression, replace all deviations for which |y - ybar| is greater than or equal to ks with ks. Simplify. 
I'm not sure what that means. 
 A: This is Chebyshev’s inequality. Here’s an extended HINT. 
You know that the standard deviation $s$ is given by the expression
$$s^2=\frac1{n-1}\sum_{k=1}^n\left(y_k-\bar y\right)^2\;,$$
where the $n$ observations are $y_1,y_2,\ldots,y_n$. (You missed the square on $y-\bar y$ in your statement of the hint.) Split the set $\{1,2,\ldots,n\}$ in two by letting $A=\{k:|y_k-\bar y|<ks\}$ and $B=\{k:|y_k-\bar y|\ge ks\}$. Note that if $k\in B$, then $(y_k-\bar y)^2=|y_k-\bar y|^2\ge k^2s^2$. Thus,
$$\begin{align*}
s^2&=\frac1{n-1}\sum_{k=1}^n\left(y_k-\bar y\right)^2\\
&=\frac1{n-1}\left(\sum_{k\in A}(y_k-\bar y)^2+\sum_{k\in B}(y_k-\bar y)^2\right)\\
&\ge\frac1{n-1}\left(\sum_{k\in A}(y_k-\bar y)^2+\sum_{k\in B}k^2s^2\right)\\
&=\frac1{n-1}\left(\sum_{k\in A}(y_k-\bar y)^2+|B|k^2s^2\right)\\
&\ge\frac{|B|k^2}{n-1}s^2\;.
\end{align*}$$
where $|B|$ is the number of elements in $B$. Dividing through by $s^2k^2$ gives us $$\frac1{k^2}\ge\frac{|B|}{n-1}\;.\tag{1}$$
The observations in the interval $(\bar y-ks,\bar y+ks)$ are the observations $y_k$ with $k\in A$, so the proportion of such observations is $\frac{|A|}n$. You want to show that $$\frac{|A|}n\ge1-\frac1{k^2}\;.\tag{2}$$ Use $(1)$ and the fact that $|A|+|B|=n$ to derive $(2)$.
