Bayesian inference shifts the focus from fixed-point p-values to probability distributions, allowing you to quantify the likelihood of your hypotheses directly. Lattice implements this through a three-stage architecture: first, the LLM maps your specific research intent—such as conducting an A/B test or modeling nested group effects—to the appropriate deterministic tool. Second, the engine executes the math using verified libraries like PyMC for Markov Chain Monte Carlo (MCMC) simulations or scipy for exact conjugate distributions. Finally, the LLM translates the complex mathematical output into plain language, summarizing Highest Density Intervals (HDI), probability of direction, and decision-making metrics so you can focus on actionable insights rather than parsing algorithm logs.
When to choose this family
- You need to make a decision based on the probability that one intervention is better than another, rather than a binary reject/fail-to-reject outcome.
- Your data contains nested or hierarchical groups, and you want to account for variation across those groups.
- You have small sample sizes and want to incorporate existing knowledge or prior constraints into your analysis.
- You need a robust way to determine if two groups are 'practically equivalent' rather than just statistically different.
What this family does
These tools provide a probabilistic framework for analysis, producing posterior distributions rather than single-number summaries. By using methods like Kruschke’s BEST (Bayesian Estimation Supersedes the T-test) and hierarchical regression, the tools allow you to model complex data structures while maintaining clear, intuitive results.
The family handles everything from simple proportion comparisons using conjugate Beta-Bernoulli distributions to advanced hierarchical models that account for random intercepts and slopes. Every output includes measures of uncertainty like 95% HDIs, which define the range where the most credible values of your parameters reside.
Differentiation and methodology
Unlike frequentist methods that rely on long-run frequency assumptions, these tools calculate the probability of parameters given your observed data. We utilize MCMC sampling for complex models to ensure accurate posterior estimates, while for specific cases like A/B testing, we use exact analytical solutions to ensure maximum performance and reproducibility.
Our implementation distinguishes between full MCMC simulations—which provide rigorous convergence diagnostics like R-hat and Effective Sample Size (ESS)—and variational inference (VB) used for rapid GLMM approximation. This allows you to choose the balance between precision and speed that fits your current workflow.
Common pitfalls
A frequent error is ignoring convergence diagnostics. If the MCMC chains fail to mix (indicated by high R-hat values), your results may be unreliable; the system provides clear warnings when these diagnostic thresholds are not met.
Another mistake is misinterpreting variational inference outputs. Because VB approximates the posterior as a normal distribution, it may understate uncertainty in complex, non-Gaussian scenarios. Always check the result metadata to confirm if a tool used an approximation or a full MCMC simulation.
Frequently asked questions
- How do I know if my Bayesian model actually worked?
- For most tools, check the convergence summary in the output. If you see R-hat values over 1.01 or ESS values below 400, the simulation did not reach stability. If using a tool labeled as a variational approximation, look for a success indicator rather than MCMC metrics.
- Why is my A/B test result showing 'inconclusive' instead of a win?
- Our tools use a decision-theory approach with ROPE (Region of Practical Equivalence) or probability thresholds. If the posterior distribution is too wide or straddles your threshold, the system reports 'inconclusive' to prevent you from making a decision based on noisy, insufficient evidence.
- Can I compare these R-squared values to those from a standard OLS model?
- No. The Bayesian R-squared provided in our regression tools is a 'conditional' R-squared that accounts for hierarchical random effects. It is computed differently than the standard OLS version and should not be used for direct comparisons across different model architectures.