<p>Questions about derivations are often asked and answered. Sometimes, when they are homework, then they are off-topic (or actually technically not off-topic, but considered written in a bad format).</p>
<h3>Questions with details and understanding</h3>
<p>If your question is about</p>
<blockquote>
<p>and I want to understand the mathematical formula</p>
</blockquote>
<p>then it is always on-topic</p>
<p>(provided that it is about statistics, purely mathematical questions are sometimes moved to the maths stackexchange page, an example is <a href="https://math.stackexchange.com/questions/4784766/">proof using Cauchy Schwarz inequality</a>).</p>
<p>Here are some examples with the bias variance decomposition formula</p>
<ul>
<li><a href="https://stats.stackexchange.com/questions/256141/">Mathematical intuition of Bias-Variance equation</a></li>
<li><a href="https://stats.stackexchange.com/questions/123320">MSE decomposition to Variance and Bias Squared</a></li>
<li><a href="https://stats.stackexchange.com/questions/505231/">Conditional bias-variance decomposition of MSE</a></li>
<li><a href="https://stats.stackexchange.com/questions/469384">Bias-Variance decomposition: Expectations over what?</a></li>
</ul>
<hr />
<h3>Homework</h3>
<p>Home-work and study type of questions are a slightly difficult situation. If you have 'trouble deriving the mathematical formulae' then you should ideally explain that trouble, as that's the root cause of the problem.</p>
<p>The point of doing home-work is to learn from the experience. Getting the answer without doing any work and learning how to overcome the trouble doesn't help much. Also, home-work questions are often a duplicate of a previously existing question with only a slight variation. E.g. <a href="https://stats.stackexchange.com/search?q=find+MLE">find the MLE</a>.</p>
<p>In the four questions in the previous section above the questions about the derivation are never plainly directly asking for the solution and are always about understanding the intuition or some particular step.</p>
<p>You might see homework questions being answered even when it is borderline. I notice that I did this here <a href="https://stats.stackexchange.com/questions/319238/">Showing $\frac{2X}{1-X^2}$ is standard Cauchy when $X$ is standard Cauchy</a>  Possibly it helps if an answer can be about intuition or in some other way a more colorful description about the method of derivation, but based on the question this can not be directly said whether this is gonna be the case.</p>
<p>See also the <a href="https://stats.stackexchange.com/tags/self-study/info">self-study tag info</a></p>
<h3>'How did they do/derive/prove this?' type of questions</h3>
<p>This doesn't mean that asking directly for derivations is off-topic. For example if someone finds some step in an article and asks how it is derived like &quot;I have been reading this article ... from ... and do not see how they got equation ... How can we derive this?&quot;</p>
<p>Example:</p>
<ul>
<li><a href="https://stats.stackexchange.com/questions/243384/">Deriving Bellman&#39;s Equation in Reinforcement Learning</a></li>
<li><a href="https://stats.stackexchange.com/questions/164223">Proof of LOOCV formula</a></li>
</ul>
<p>However, if it is formulated without any context and if it is a simple question then people might think that it is homework and ignore it.</p>
<h3>Other</h3>
<p>I myself have made several questions about derivations as sub-questions to other questions</p>
<ul>
<li><a href="https://stats.stackexchange.com/questions/552589">Deriving the limiting distribution of a sum of Pareto distributed variables</a></li>
<li><a href="https://stats.stackexchange.com/questions/548613">Derivation of moment generating function for limiting distribution of sum of logbeta distributed variables</a></li>
</ul>
<h3>Structural formulas of linear models</h3>
<p>At first I thought your question was about deriving mathematical equations, but I also notice your question.</p>
<p><a href="https://stats.stackexchange.com/questions/631850">Doubts about mixed model (R vs SAS) with nested random effects</a></p>
<p>which is more about the use of syntax and debugging code. Questions about writing such formulae have been closed before <a href="https://stats.stackexchange.com/questions/603881">Why do I have to subtract 1 from R regression to measure fixed effects?</a> because they are about coding. Personally I feel that this is borderline as I argued in a comment it can be seen in a wider context than just a single programming language</p>
<blockquote>
<p>I don't believe this is much about R notation. Those symbolic notations of the structural formulas of linear models are used in a wider setting. An early description is Wilkinson and Rogers, 1973, <a href="https://doi.org/10.2307/2346786" rel="nofollow noreferrer">Symbolic Description of Factorial Models for Analysis of Variance</a>.</p>
</blockquote>
<p>other questions like that are</p>
<ul>
<li><a href="https://stats.stackexchange.com/questions/551690/">How do I specify crossed random intercepts in lme?</a></li>
<li><a href="https://stats.stackexchange.com/questions/548024/">Retrieving correlations through linear mixed-effects modeling</a></li>
<li><a href="https://stats.stackexchange.com/questions/561826/">Difficulty of specifying a within-group correlation structure in a linear mixed-effects model</a></li>
</ul>
<p>These are always a bit tricky. A question about a warning message from a computer code is about coding , but when it involves statistics to solve the problem then it is on-topic. However, without the answer it might not be clear whether the solution is about a statistics problem or not.</p>
<p>In your case, the answer seems to me like it is more about the logic, the encoding off the location:block not being nested in your data, and this makes it less of a programming error specific to the programming language. That makes it less off-topic (at least in my opinion).</p>
