I am currently self-studying basic statistical testing (Z-testing and t-testing of at least approximately normally distributed one sample) and calculating confidence interval estimates for true population means. I've seen different approaches and formulas/notations and I just want to clarify/check my understanding.
I understand that the t-test should be used when the population standard deviation is unknown or when sample size $n<30$. Otherwise the Z-test can be used with reasonable accuracy due CLT or due SD simply being known.
Question 1: Regardless of the chosen test, is the formula used to calculate the Z or t-score always of form $$\dfrac{\bar{X}-\mu}{\sigma/\sqrt{n}}\text{ or } \dfrac{\bar{X}-\mu}{s/\sqrt{n}}$$ where $\bar{X}$ is the sample mean, $\mu$ the hypothesis mean, $\sigma$ the known population SD in the case of Z-test and $s$ the calculated sample SD from $$s=\sqrt{\dfrac{\sum_{i=1}^n(x_i-\bar{X})^2}{n-1}}$$ or must I always use the right hand side formula? Is it never possible to simply use only $\sigma$ in the denominator if it is known?
Question 2: Is the formula for the confidence interval always of the form $$\bar{X}\pm z^*\dfrac{s}{\sqrt{n}} \text{ or }\bar{X}\pm t^*\dfrac{s}{\sqrt{n}},$$ depending on which distribution is appropriate?