I have a Chains object chain_normal
:
julia> @show chain_normal
chain_normal = MCMC chain (1000×14×4 Array{Float64, 3})
Chains MCMC chain (1000×14×4 Array{Float64, 3}):
Iterations = 501:1:1500
Number of chains = 4
Samples per chain = 1000
Wall duration = 15.27 seconds
Compute duration = 60.7 seconds
parameters = μ, σ
internals = lp, n_steps, is_accept, acceptance_rate, log_density, hamiltonian_energy, hamiltonian_energy_error, max_hamiltonian_energy_error, tree_depth, numerical_error, step_size, nom_step_size
Summary Statistics
parameters mean std naive_se mcse ess rhat ess_per_s ⋯
Symbol Float64 Float64 Float64 Float64 Float64 Float64 Float ⋯
μ 14.8588 0.2065 0.0033 0.0038 3281.5093 0.9998 54.05 ⋯
σ 0.9170 0.1631 0.0026 0.0027 3109.1461 1.0002 51.21 ⋯
1 column omitted
Quantiles
parameters 2.5% 25.0% 50.0% 75.0% 97.5%
Symbol Float64 Float64 Float64 Float64 Float64
μ 14.4474 14.7244 14.8590 14.9937 15.2685
σ 0.6617 0.8024 0.8948 1.0073 1.3041
I want to ask questions like “what is the probability that the mean is over 15”. To do so. I would calculate something like the following pseudocode:
1-cdf(chain_normal[:μ], 15)
That does of course not work. But how am I supposed to ask such questions about objects of type Chain
, in a bayesean inference context?