# Double subscript and superscript

I have tried several approach and search for similar cases but I couldn't make this working.

As you can see the highlighted yellow looks improper and wrong. I would like to fix the following issues

1) make the subscript and superscript smaller

2) remove the space between sigma and its subscript

3) when i add sigma with subscript beta in the denominator they look like multiplication

I used the following code

$\beta_1,\frac{\sigma^2_{\epsilon}}{S_{xx}}$ and $\sigma^2_{\beta_i}$ and $\frac{\hat{\beta}_i-\beta_i}{\sigma_{\beta_i}}$

I tried using the below code but didn't work also.

\usepackage{lmodern}

\DeclareMathSizes{7}{7}{5}{4} % \scriptsize is 7 pt

\DeclareMathSizes{10}{5}{2}{1} % \tiny is 5 pt  {S}{t}{s}{ss}

• I suggest \sigma^{}_{\beta_1} for the third case and the similar ones. Dec 31, 2016 at 15:19
• Please tell us what "I couldn't make this working" entails. Are you getting error and/or warning messages?
– Mico
Dec 31, 2016 at 16:17
• Looks wrong because it looks as multiplication not subscripts. I used \sigma^{}_{\beta_1} before and wasn't helpful Dec 31, 2016 at 16:17
• Mico i can get it small subscript or superscript and without space Dec 31, 2016 at 16:19
• Incidentally, I think there's a typo in the screenshot you posted: In the second row, \hat{beta}_0 should be distributed normally about \beta_0 and not about \beta_1, right?
– Mico
Dec 31, 2016 at 22:16

I'm inferring that you're not happy with the basic "look" because you would like the subscripts of \sigma to be less far away, i.e, they should be snugged up to the left. If this is the concern, just write \sigma_{\!\beta_1}, \sigma_{\!\beta_1}, etc.

You may also want to settle on a standard size for the fraction terms. In your screenshot \frac (or \dfrac) appears to be employed for the left-hand material, whereas \tfrac appears to be used for the material to the right of \Rightarrow. I would choose one or the other look, but not mix 'em up in one and the same equation. Speaking for myself, I prefer \frac look (with larger parentheses) to the \tfrac look (with smaller parentheses).

\documentclass{article}
\usepackage{amsmath}
\begin{document}
%% look 1: \tfrac and \big parentheses
\begin{alignat*}{2}
\hat{\beta}_1 &\sim N\bigl(\beta_1,\tfrac{\sigma^2_{\!\epsilon}}{S_{xx}}\bigr) \sim N(\beta_1,\sigma^2_{\!\beta_1})
&&\Rightarrow \tfrac{\hat{\beta}_1-\beta_1}{\sigma^{}_{\!\beta_1}}
=\tfrac{\hat{\beta}_1-\beta_1}{\sigma^{}_{\!\epsilon}/\sqrt{S_{xx}}} \sim N(0,1)\\
\hat{\beta}_0 &\sim N\bigl(\beta_0,\sigma^2_{\!\epsilon} \bigl[\tfrac{1}{n}+\tfrac{\bar{X}^2}{S_{xx}}\bigr]\bigr)
\sim N(\beta_1,\sigma^2_{\!\beta_0})
&&\Rightarrow \tfrac{\hat{\beta}_0-\beta_0}{\sigma^{}_{\!\beta_1}}
=\tfrac{\hat{\beta}_0-\beta_0}{\sigma^{}_{\!\epsilon}
\sqrt{\frac{1}{n}+\frac{\bar{X}^2}{S_{xx}}}}
\sim N(0,1)
\end{alignat*}

%% look 2: \frac and \bigg parentheses
\begin{alignat*}{2}
\hat{\beta}_1 &\sim N\biggl(\beta_1,\frac{\sigma^2_{\!\epsilon}}{S_{xx}}\biggr) \sim N(\beta_1,\sigma^2_{\!\beta_1})
&&\Rightarrow \frac{\hat{\beta}_1-\beta_1}{\sigma^{}_{\!\beta_1}}
=\frac{\hat{\beta}_1-\beta_1}{\sigma^{}_{\!\epsilon}/\sqrt{S_{xx}}} \sim N(0,1)\\
\hat{\beta}_0 &\sim N\biggl(\beta_0,\sigma^2_{\!\epsilon} \biggl[\frac{1}{n}+\frac{\bar{X}^2}{S_{xx}}\biggr]\biggr)
\sim N(\beta_1,\sigma^2_{\!\beta_0})
&&\Rightarrow \frac{\hat{\beta}_0-\beta_0}{\sigma^{}_{\!\beta_1}}
=\frac{\hat{\beta}_0-\beta_0}{\sigma^{}_{\!\epsilon}
\sqrt{\frac{1}{n}+\frac{\bar{X}^2}{S_{xx}}}}
\sim N(0,1)
\end{alignat*}
\end{document}