# Statistics

**URL:** https://discourse.julialang.org/c/domain/stats/12.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [About the Statistics category](https://discourse.julialang.org/t/about-the-statistics-category/89)

<div class="topic-metadata">

**Author:** [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Replies:** 0

</div>

This subcategory is for discussion around statistics and machine learning. Probability distributions, fitting models, etc. Also welcomed is discussion about the projects or packages maintained by the organisations below…

---

## [Automatic reparametrizations of distributions in Distributions.jl](https://discourse.julialang.org/t/automatic-reparametrizations-of-distributions-in-distributions-jl/132431)

<div class="topic-metadata">

**Author:** [@giovannitinervia9](https://discourse.julialang.org/u/giovannitinervia9)\
**Replies:** 2\
**Last updated:** [August 6, 2026, 9:53am UTC](https://discourse.julialang.org/t/automatic-reparametrizations-of-distributions-in-distributions-jl/132431 "2026-08-06T09:53:24Z")

</div>

Hi everyone, I’m thinking about a potential feature for the Distributions.jl package that would be nice to have. Would it be possible to implement a function, let’s say reparametrize, that takes an existing distribution…

---

## [Transformations](https://discourse.julialang.org/t/transformations/138583)

<div class="topic-metadata">

**Author:** [@parn4q](https://discourse.julialang.org/u/parn4q)\
**Replies:** 3\
**Last updated:** [August 4, 2026, 7:44am UTC](https://discourse.julialang.org/t/transformations/138583 "2026-08-04T07:44:25Z")

</div>

I’d like to start my Julia contributions to the StatsFuns.jl or the Statsistics.jl packages, specifically, transformations. Is it possible to add a boxcox or yeojohnson transformation to one of the packages? If so, what…

---

## [AD using Enzyme in ODE problem with DataInterpolations](https://discourse.julialang.org/t/ad-using-enzyme-in-ode-problem-with-datainterpolations/137771)

<div class="topic-metadata">

**Author:** [@imre](https://discourse.julialang.org/u/imre)\
**Replies:** 3\
**Last updated:** [June 29, 2026, 7:47am UTC](https://discourse.julialang.org/t/ad-using-enzyme-in-ode-problem-with-datainterpolations/137771 "2026-06-29T07:47:07Z")

</div>

Hello, I have an ODE problem which uses DataInterpolations.jl to obtain input values for the system at specific timepoints in order to compute dx. I want to use Enzyme.jl to compute the gradients with respect to paramete…

---

## [Kernel Density Estimate boundary problems](https://discourse.julialang.org/t/kernel-density-estimate-boundary-problems/115200)

<div class="topic-metadata">

**Author:** [@vh94](https://discourse.julialang.org/u/vh94)\
**Replies:** 6\
**Last updated:** [May 11, 2026, 7:17am UTC](https://discourse.julialang.org/t/kernel-density-estimate-boundary-problems/115200 "2026-05-11T07:17:57Z")

</div>

Hello everyone, I am currently trying to calculate probability density curves using the KernelDensity.jl package, however I ran into some issues due to the nature of my data. I am not a statistician so i will have to e…

---

## [Area under a ROC Curve after a logistic regression](https://discourse.julialang.org/t/area-under-a-roc-curve-after-a-logistic-regression/121121)

<div class="topic-metadata">

**Author:** [@mwsohn](https://discourse.julialang.org/u/mwsohn)\
**Replies:** 3\
**Last updated:** [April 14, 2026, 8:09pm UTC](https://discourse.julialang.org/t/area-under-a-roc-curve-after-a-logistic-regression/121121 "2026-04-14T20:09:03Z")

</div>

I am trying to compute ROCAnalysis.jl package to compute the AUC value after a logistic regression. When I ran auc(roc(dep, pred)), where dep is the vector with original binary dependent variable and pred the predicted…

---

## [On-line storage of MCMC output](https://discourse.julialang.org/t/on-line-storage-of-mcmc-output/136178)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 8\
**Last updated:** [March 21, 2026, 2:27am UTC](https://discourse.julialang.org/t/on-line-storage-of-mcmc-output/136178 "2026-03-21T02:27:57Z")

</div>

I frequently run MCMC for Bayesian estimation which takes a long time (weeks), had a large dimension (10^5–10^6) It would be great to have a means to save the results to disk while in progress, “peek into”…

---

## [Incorporating Splines and Offset in MixedModels.jl](https://discourse.julialang.org/t/incorporating-splines-and-offset-in-mixedmodels-jl/136025)

<div class="topic-metadata">

**Author:** [@imantha](https://discourse.julialang.org/u/imantha)\
**Replies:** 3\
**Last updated:** [March 12, 2026, 4:23am UTC](https://discourse.julialang.org/t/incorporating-splines-and-offset-in-mixedmodels-jl/136025 "2026-03-12T04:23:57Z")

</div>

Hi, I am working on project that required doing multilevel models and the dataset is quite large (7 million rows). My current implementation is in R but takes quite a bit of time using glmmTMB package. So, I was wonderi…

---

## [LsqFit example](https://discourse.julialang.org/t/lsqfit-example/135621)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 1\
**Last updated:** [February 13, 2026, 6:19pm UTC](https://discourse.julialang.org/t/lsqfit-example/135621 "2026-02-13T18:19:49Z")

</div>

I am working through the initial example in GitHub - JuliaNLSolvers/LsqFit.jl: Simple curve fitting in Julia and don’t know where the function model comes from. julia\> using LsqFit julia\> xdata = range(0, stop=10, leng…

---

## [Sigma-clip function?](https://discourse.julialang.org/t/sigma-clip-function/88228)

<div class="topic-metadata">

**Author:** [@mkretlow](https://discourse.julialang.org/u/mkretlow)\
**Replies:** 2\
**Last updated:** [February 5, 2026, 2:59pm UTC](https://discourse.julialang.org/t/sigma-clip-function/88228 "2026-02-05T14:59:29Z")

</div>

Before I re-invent the wheel… Do a sigma-clip function exist (similar to scipy.stats.sigmaclip) in some Julia package, preferable which works also on DataFrames !?

---

## [Gaussian Copula Priors in Turing: Auto-differentiation Error with Beta Quantile Function](https://discourse.julialang.org/t/gaussian-copula-priors-in-turing-auto-differentiation-error-with-beta-quantile-function/132779)

<div class="topic-metadata">

**Author:** [@giovannitinervia9](https://discourse.julialang.org/u/giovannitinervia9)\
**Replies:** 7\
**Last updated:** [January 26, 2026, 1:16pm UTC](https://discourse.julialang.org/t/gaussian-copula-priors-in-turing-auto-differentiation-error-with-beta-quantile-function/132779 "2026-01-26T13:16:37Z")

</div>

I’m trying to fit a Bayesian model in Turing that uses Gaussian copula priors for parameters bounded in (0, 1). The baseline model with independent priors works fine, but when I introduce copula-based correlations, I enc…

---

## [Overdispersed alternative to multinomial](https://discourse.julialang.org/t/overdispersed-alternative-to-multinomial/134533)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 2\
**Last updated:** [December 20, 2025, 3:27pm UTC](https://discourse.julialang.org/t/overdispersed-alternative-to-multinomial/134533 "2025-12-20T15:27:25Z")

</div>

I have a multilevel Bayesian model where (a\_i, b\_i, c\_i) = f(\\theta\_i) for each unit i = 1, \\dots, 1000, which are latent variables, f comes from a model. For each i, and j = 1, 2, 3, I observe (A\_{i,j}, B\_{i,j}, C\_{i,j…

---

## [How to obtain the pvalues of the coefficients in GLM.jl?](https://discourse.julialang.org/t/how-to-obtain-the-pvalues-of-the-coefficients-in-glm-jl/9531)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 5\
**Last updated:** [December 19, 2025, 9:50pm UTC](https://discourse.julialang.org/t/how-to-obtain-the-pvalues-of-the-coefficients-in-glm-jl/9531 "2025-12-19T21:50:09Z")

</div>

I have fitted a model using DataFrames df = DataFrame( x = 2\*y + 1 + rand(100), y = rand(100) ) using GLM mdl = lm(@formula(y~x), df) now I can see the pvalues of the coefficients. How do I obtain the pvalues and s…

---

## [Issue with Binomial distribution and recent ForwardDiff versions](https://discourse.julialang.org/t/issue-with-binomial-distribution-and-recent-forwarddiff-versions/134347)

<div class="topic-metadata">

**Author:** [@Pablo\_Marchant](https://discourse.julialang.org/u/Pablo_Marchant)\
**Replies:** 2\
**Last updated:** [December 12, 2025, 3:57pm UTC](https://discourse.julialang.org/t/issue-with-binomial-distribution-and-recent-forwarddiff-versions/134347 "2025-12-12T15:57:48Z")

</div>

Hi, recently I noticed some code I’ve been using broke after updating Forward Diff. The issue came from sampling with Turing using a binomial likelihood. Digging into it it boiled down to this: using ForwardDiff using …

---

## [Laplacian regularisation for GLMs](https://discourse.julialang.org/t/laplacian-regularisation-for-glms/134154)

<div class="topic-metadata">

**Author:** [@grero](https://discourse.julialang.org/u/grero)\
**Replies:** 10\
**Last updated:** [December 4, 2025, 2:59am UTC](https://discourse.julialang.org/t/laplacian-regularisation-for-glms/134154 "2025-12-04T02:59:52Z")

</div>

I would like to use GLM to approximate an integer variable as following a Poisson distribution where the rate parameter is determined by a the independent variable X. X lives in a non-Euclidean space, and so using vanill…

---

## [L-moment package?](https://discourse.julialang.org/t/l-moment-package/54536)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 1\
**Last updated:** [November 28, 2025, 2:00am UTC](https://discourse.julialang.org/t/l-moment-package/54536 "2025-11-28T02:00:13Z")

</div>

hello, I wonder if L-moment related summary statistics are available in any Julia package? thanks.

---

## [Structured multivariate regression](https://discourse.julialang.org/t/structured-multivariate-regression/133954)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 2\
**Last updated:** [November 21, 2025, 12:41pm UTC](https://discourse.julialang.org/t/structured-multivariate-regression/133954 "2025-11-21T12:41:46Z")

</div>

I have a multivariate linear model which imposes the specific structure for each vector observation \\mathbf{y}\_i \\mathbf{y}\_i = \\mathbf{b}\_0 + \\begin{bmatrix} X\_{1,i} & 0 & X\_{c,i} \\\\ 0 & X\_{2,i} & X\_{c,i} \\\\ X\_{1,i} & …

---

## [Partial Least Squares](https://discourse.julialang.org/t/partial-least-squares/133742)

<div class="topic-metadata">

**Author:** [@eweiss](https://discourse.julialang.org/u/eweiss)\
**Replies:** 2\
**Last updated:** [November 11, 2025, 10:08pm UTC](https://discourse.julialang.org/t/partial-least-squares/133742 "2025-11-11T22:08:40Z")

</div>

I want to experiment with partial least squares regressions. My research points to lalvim’s PartialLeastSquaresRegressor as the only package with PLSR, but when I run Example 1, PLSRegressor() isn’t found. If there is …

---

## [R in Julia on Android works great :-) (Screenshot)](https://discourse.julialang.org/t/r-in-julia-on-android-works-great-screenshot/133719)

<div class="topic-metadata">

**Author:** [@Mike\_Stein](https://discourse.julialang.org/u/Mike_Stein)\
**Replies:** 2\
**Last updated:** [November 6, 2025, 11:12pm UTC](https://discourse.julialang.org/t/r-in-julia-on-android-works-great-screenshot/133719 "2025-11-06T23:12:40Z")

</div>

Having fun with Julia and R setup in Termux on Android with RCall julia library and being able to toggle in between them. For some reason not able to install.packages in R in Julia but not a big deal since can just inst…

---

## [Kolmogorov-Smirnov test](https://discourse.julialang.org/t/kolmogorov-smirnov-test/89990)

<div class="topic-metadata">

**Author:** [@GHTaarn](https://discourse.julialang.org/u/GHTaarn)\
**Replies:** 23\
**Last updated:** [October 22, 2025, 6:46pm UTC](https://discourse.julialang.org/t/kolmogorov-smirnov-test/89990 "2025-10-22T18:46:20Z")

</div>

I have a sample consisting of a set of integers and want to test if can be from a specific distribution. I am not that strong in statistics, but my understanding is that the Kolmogorov-Smirnov test is a good choice for a…

---

## [Package for Multivariate (normal) Conditional Distribution](https://discourse.julialang.org/t/package-for-multivariate-normal-conditional-distribution/112765)

<div class="topic-metadata">

**Author:** [@PharmCat](https://discourse.julialang.org/u/PharmCat)\
**Replies:** 2\
**Last updated:** [October 22, 2025, 2:23pm UTC](https://discourse.julialang.org/t/package-for-multivariate-normal-conditional-distribution/112765 "2025-10-22T14:23:59Z")

</div>

Hi! Is any package to get Multivariate (normal) Conditional Distribution? Something like described here.

---

## [\[AdvancedHMC\] Implementation of Custom HMCKernel](https://discourse.julialang.org/t/advancedhmc-implementation-of-custom-hmckernel/132664)

<div class="topic-metadata">

**Author:** [@sample\_slice\_of\_life](https://discourse.julialang.org/u/sample_slice_of_life)\
**Replies:** 1\
**Last updated:** [October 15, 2025, 7:37am UTC](https://discourse.julialang.org/t/advancedhmc-implementation-of-custom-hmckernel/132664 "2025-10-15T07:37:31Z")

</div>

Hello all, I am a student researching possible extensions of HMC-type samplers for settings in which posteriors exhibit high correlation between parameters. I have a working implementation of a code for a toy problem i…

---

## [Bug in StatsPlots' call to groupedhist with normalize=:true?](https://discourse.julialang.org/t/bug-in-statsplots-call-to-groupedhist-with-normalize-true/133023)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 5\
**Last updated:** [October 10, 2025, 11:36am UTC](https://discourse.julialang.org/t/bug-in-statsplots-call-to-groupedhist-with-normalize-true/133023 "2025-10-10T11:36:54Z")

</div>

Hi there, Consider the following data.csv file: Class\_Name Grade Turma 6 4.2 Turma 4 3.5 Turma 6 0.2 Turma 3 Especial 1.6 Turma 2 Piloto 7.8 Turma 4 1.4 Turma 5 1.6 Turma 6 3.8000000000000003 Turma 6 1.5 Turma 6 5.8000…

---

## [Gaussian process with noisy heteroscedastic correlated targets (outputs)](https://discourse.julialang.org/t/gaussian-process-with-noisy-heteroscedastic-correlated-targets-outputs/132582)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 2\
**Last updated:** [September 25, 2025, 11:12am UTC](https://discourse.julialang.org/t/gaussian-process-with-noisy-heteroscedastic-correlated-targets-outputs/132582 "2025-09-25T11:12:43Z")

</div>

Hi there, I have 2 kinds of datasets to which I would like to fit a Gaussian process: (1) a dataset with N observations: (x\_i, y\_i, \\sigma\_i) , i=1, 2, ..., N, where x\_i are the input (covariate) variables, y\_i the out…

---

## [Hybrid MCMC Algorithm](https://discourse.julialang.org/t/hybrid-mcmc-algorithm/132400)

<div class="topic-metadata">

**Author:** [@jackmarry](https://discourse.julialang.org/u/jackmarry)\
**Replies:** 2\
**Last updated:** [September 21, 2025, 5:04pm UTC](https://discourse.julialang.org/t/hybrid-mcmc-algorithm/132400 "2025-09-21T17:04:25Z")

</div>

I saw the steps for a Bayesian estimation algorithm in a paper, and I was wondering if there’s a way to implement this kind of hybrid MCMC algorithm using the Turing.jl library.

---

## [In ComplexityMeasures.jl, is there a way to use elements of an OutcomeSpace as keys for Probabilities?](https://discourse.julialang.org/t/in-complexitymeasures-jl-is-there-a-way-to-use-elements-of-an-outcomespace-as-keys-for-probabilities/132038)

<div class="topic-metadata">

**Author:** [@mikhael](https://discourse.julialang.org/u/mikhael)\
**Replies:** 0\
**Last updated:** [September 1, 2025, 9:57pm UTC](https://discourse.julialang.org/t/in-complexitymeasures-jl-is-there-a-way-to-use-elements-of-an-outcomespace-as-keys-for-probabilities/132038 "2025-09-01T21:57:09Z")

</div>

Suppose I build a Probabilities object Prs from a vector x like so: using ComplexityMeasures x = rand(\[true, false\], 10) Prs, outs = allprobabilities\_and\_outcomes(UniqueElements(), x) I would like to have a Dict-like…

---

## [Warnings when using logpdf of NoncentralT](https://discourse.julialang.org/t/warnings-when-using-logpdf-of-noncentralt/131815)

<div class="topic-metadata">

**Author:** [@Transfrogirl](https://discourse.julialang.org/u/Transfrogirl)\
**Replies:** 0\
**Last updated:** [August 24, 2025, 8:29pm UTC](https://discourse.julialang.org/t/warnings-when-using-logpdf-of-noncentralt/131815 "2025-08-24T20:29:27Z")

</div>

logpdf(NoncentralT(v, u), x) leads to warnings «full precision may not have been achieved in ‘pnt{final}’ ». as far as abs(u)\<40 On Linux, at least

---

## [Obtain the prior distribution for a function's parameter](https://discourse.julialang.org/t/obtain-the-prior-distribution-for-a-functions-parameter/131677)

<div class="topic-metadata">

**Author:** [@Cyan](https://discourse.julialang.org/u/Cyan)\
**Replies:** 3\
**Last updated:** [August 18, 2025, 5:50pm UTC](https://discourse.julialang.org/t/obtain-the-prior-distribution-for-a-functions-parameter/131677 "2025-08-18T17:50:23Z")

</div>

Hi, all. I met a problem getting the prior distribution for parameters in a function f(x; b, s, q). I wish to obtain a dict ParaDict = Dict(:b =\> b, :s =\> s, :q =\> q) in form of b ~ truncated(Normal(1., 1), 0, 5) s ~ t…

---

## [Bilinear Model in Turing](https://discourse.julialang.org/t/bilinear-model-in-turing/131614)

<div class="topic-metadata">

**Author:** [@hdubey](https://discourse.julialang.org/u/hdubey)\
**Replies:** 2\
**Last updated:** [August 18, 2025, 3:23pm UTC](https://discourse.julialang.org/t/bilinear-model-in-turing/131614 "2025-08-18T15:23:02Z")

</div>

Hello, I am new to Julia and I am running Bayesian inference in Turing for a Bilinear Model- Y = X \* B \* Z’ + E where Y is nxm, X is nxp, B is pxq and Z is mxq. E is also nxm and follows multivariate normal (0, Sigma)…

---

## [Fitting Distributions](https://discourse.julialang.org/t/fitting-distributions/131608)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 8\
**Last updated:** [August 15, 2025, 11:19am UTC](https://discourse.julialang.org/t/fitting-distributions/131608 "2025-08-15T11:19:48Z")

</div>

Hello everyone, I have a task to determine which distribution corresponds to the probability density function constructed from my data. To address this, I use the KS-test for distributions that I consider somewhat sim…

[Next page](https://discourse.julialang.org/c/domain/stats/12.md?page=1)
