The first example is not a demonstration for bayesian inference. It uses a simple tool used in the "frequentist" approach. The bayesian approach example is below that. My point is the two are mutually exclusive in these scenarios. I am trying to demonstrate that there are formulas for different scenarios and you don't pit them against each other. The response to that was just pedantic.
Your example is flawed because the example has nothing to do with the difference between Bayesian and Frequentist inference, because neither approach is needed.
In the same way that you don’t use Bayesian approach, you also have not done anything frequentist. All you need for this problem is to calculate some probabilities. There is nothing “frequentist” about calculating probabilities (and nothing Bayesian about it either), because it is more fundamental than that.
There is nothing Bayesian or Frequentist about basic probability theory. They are both interpretations that rely on the existence of probability theory to make sense. So solving a problem with basic probability theory and claiming I did “Frequentism” is correct, but meaningless.
In my opinion, Bayes is the more general approach. But the Frequentist approach can be simpler if your prior is uniform and you only care about the output, not the distribution.
E.g. Neural Networks, where the computational cost makes modelling the problem in a Bayesian way much more expensive.
Or you can say the Frequentist approach is simpler for estimating the probability of heads for a biased coin, as long as you have no prior and only care about the most likely value, not the distribution.
It is not about "more expensive computation" that is just absolute nonsensical rhetoric. Again, given these basic examples, probability of outcomes have nothing to do with bayes. Bayes needs at least two scenarios to distinguish between. Simply P and 1-P reduces the formula into a counting problem. I am done with this.
Bayesian models at the scale of modern LLMs are not commonly used because the equivalent techniques (like MCMC) are more expensive, which limits how big and useful the model can be. This is a practical example of when pragmatic frequentism is better in a real scenario.
> it is a counting problem
It isn’t a counting problem in the general case. If you use MLE and do number of heads / total flips, that is the Frequentist approach. Of course I deliberately picked the most simple random variable I could think of, so the APPROACH could be differentiated.
The Bayesian approach starts with a prior. This is implicit in Frequentist, but explicit in Bayesian. In this case, the equivalent prior is a uniform distribution between 0 and 1. Then the Bayesian approach to the problem uses Bayes theorem to decide how to update the uniform distribution based on the result of every flip.
Is the result the same? Yes - because these are different approaches, which are both valid. However, in this case the Frequentist approach resulted in a simpler solution because these implicit assumptions matched the ones we would do anyway and matched our intuition. However, if you believed that the prior distribution was non-uniform, then Bayes may become easier.
> Bayes needs at least two scenarios
The general case is that Bayes needs a prior distribution (in this case, probability of heads is uniformly between 0 and 1 is a beta distribution). Then you use Bayes rule conditioned on the data to generate the “update” rule to generate the posterior, given the result of n coin flips.