I am trying to understand Statistical Hypothesis Tests.
I have a dice that gives a six with probability 1/6 and I want to see if it really is the case.
$$H_0: \ p=\frac{1}{6} \ \ \ \ \ \ \ \ \ H_1: \ p \neq \frac{1}{6}$$ With $\alpha = 5\%$
The dice is thrown 18 times and we get 6 sixes. Can we reject $H_0$?
First of all, I see that its a two sided interval but I can't use Normal distribution since n<30 so I need to use $t_a(n-1)$ with n=18 and $a/2=0.025$ gives $t_{0.025}(17)=2.11$. I know that the p-value should somehow be 0.1028 with the answer "No we cant reject $H_0$" but I am at a loss of how to get there. How do I solve this?
As you say, you can't use a normal approximation. In R the procedure
binom.testdoes an exact binomial test of $H_0: p = 1/6$ against $H_a: p\ne 1/6$, as shown below. With $X = 6$ successes in $n=18$ trials, $H_0$ is not rejected at the 5% level of significance.As @Henry has commented, the P-value is computed under the null distribution $\mathsf{Binom}(n=18,\, p=1/6),$ which has $1 - P(1 \le X \le 5) = 0.1028,$ to four places. (See slide 12 in your link for the method.)
The figure below shows the null distribution $\mathsf{Binom}(n=18,\, p = 1/6);$ the P-value is the total height of the heavy blue bars.