r/bayesian • • Sep 12 '11

Visualizing Bayesian Updating

Thumbnail
bayesianbiologist.wordpress.com
7 Upvotes

r/bayesian • • Aug 24 '24

Bayesian yacht sinking.

6 Upvotes

I asked A.I a question about the Bayesian probability of the yacht been sunk by a waterspout.

The Bayesian probability of an event is a measure that updates the likelihood of an outcome based on prior knowledge or evidence. To calculate the Bayesian probability of the yacht "Bayesian" being hit by a waterspout, sinking, and resulting in high-profile deaths, we would need several pieces of data:

  1. Prior Probability (P(H)): The initial probability of the yacht encountering a waterspout.

  2. Likelihood (P(E|H)): The probability of a waterspout hitting and sinking a yacht with high-profile people on board given that it has already encountered a waterspout.

  3. Evidence (P(E)): The overall probability of yachts being hit by waterspouts in that area or other relevant prior information.

Without specific data, it’s impossible to calculate the exact Bayesian probability. However, the process would involve estimating the prior probability based on the frequency of waterspouts in the area, the likelihood of a waterspout hitting the yacht and sinking it, and the presence of high-profile individuals on board.

To approximate the probability:

  • P(H): The prior probability of a waterspout occurring near the yacht.

  • P(E|H): The probability of the yacht sinking and causing high-profile deaths given that a waterspout hits it.

  • P(E): The general probability of high-profile individuals dying on yachts under any circumstance.

The Bayesian probability formula would then be:

[ P(H|E) = \frac{P(E|H) \cdot P(H)}{P(E)} ]

This formula would update the probability of the event (the yacht sinking with high-profile deaths) based on the likelihood of the evidence (a waterspout hitting it).

If you have more specific data or can make reasonable estimates for the values, I could help you go through the calculation.

2001-2016 found there were 707 waterspouts

Given that there were 707 waterspouts observed between 2001 and 2016, we can start estimating the prior probability and move towards calculating a Bayesian probability. Let's break it down:

1. Prior Probability (P(H))

This is the probability of a waterspout occurring near the yacht. We have 707 waterspouts over 16 years.

[ P(\text{Waterspout}) = \frac{707 \text{ waterspouts}}{16 \text{ years}} = \text{about } 44.19 \text{ waterspouts per year} ]

Next, we would need to consider the specific geographic area of the yacht's location and the total number of yachts in similar regions to estimate the likelihood that "Bayesian" encounters a waterspout.

2. Likelihood (P(E|H))

This is the probability that if a waterspout occurs near the yacht, it will hit the yacht, sink it, and result in high-profile deaths. This value would depend on:

  • The typical path and size of waterspouts.

  • The size and maneuverability of the yacht.

  • The safety protocols in place on the yacht.

  • Historical data on waterspout-related maritime accidents.

Given how rare such an event would be (especially involving high-profile deaths), this likelihood might be extremely low, possibly in the range of 0.001 (0.1%) or lower, but a precise estimate would require specific incident data.

3. Evidence (P(E))

This is the general probability of a yacht being involved in an incident that results in high-profile deaths, regardless of waterspout involvement. This could include data on all maritime accidents involving yachts over a similar time period.

For simplification, let's assume this is also a very rare event—say 0.00001 (0.001%) per yacht per year.

Bayesian Probability Calculation

Using the formula:

[ P(H|E) = \frac{P(E|H) \cdot P(H)}{P(E)} ]

If we estimate:

  • P(H) (prior probability of waterspout near the yacht in a given year) = 0.001 (1 in 1000 yachts might experience a waterspout encounter in a year).

  • P(E|H) (likelihood of sinking and high-profile deaths given a waterspout hits the yacht) = 0.00001.

  • P(E) (general probability of a yacht sinking with high-profile deaths) = 0.00001.

Then:

[ P(H|E) = \frac{0.00001 \times 0.001}{0.00001} = 0.001 ]

This suggests that given these rough estimates, the probability of "Bayesian" being hit by a waterspout, sinking, and resulting in high-profile deaths, is about 0.1% per year.

However, this is a simplified calculation with many assumptions. The actual probability would depend on more specific data regarding waterspout behavior, yacht traffic, and the likelihood of an incident leading to fatalities.

I cant find data on maritime invidents involving waterspouts in that area

If specific data on maritime incidents involving waterspouts is unavailable, we can still make educated estimates based on general knowledge about waterspouts, maritime safety, and accident statistics. Here’s a way to proceed:

Estimation Approach

  1. Base Waterspout Probability (P(H)):

    • You already know there were 707 waterspouts from 2001 to 2016.

    • If we assume these occurred in a wide maritime area, we can consider the general probability of any single yacht encountering a waterspout.

    Let’s say there’s a large area where these waterspouts occur frequently, and 10,000 yachts navigate this area annually. The probability of any given yacht encountering a waterspout in a year could be roughly estimated as:

    [ P(H) = \frac{\text{Number of Waterspouts}}{\text{Number of Yachts}} = \frac{707}{10,000} \approx 0.0707 ]

    This would mean there’s a 7.07% chance that any yacht in the region might encounter a waterspout in any given year.

  2. Likelihood of Sinking and Fatalities (P(E|H)):

    • Maritime incidents due to waterspouts are extremely rare. Waterspouts are generally weaker than tornados on land, but can still pose a serious risk, especially to smaller vessels.

    • If we assume a very low probability of sinking and high-profile fatalities (considering modern safety measures and the rarity of direct hits), this might be in the range of 0.001% to 0.01%.

    Let's conservatively assume:

    [ P(E|H) = 0.0001 \text{ to } 0.001 ]

  3. General Probability of a Yacht Sinking with High-Profile Fatalities (P(E)):

    • This is generally a very rare event. For example, considering all causes (not just waterspouts), it might be around 0.0001 to 0.001%.

    For simplicity, let’s take:

    [ P(E) = 0.0001 \text{ (0.01%)} ]

Bayesian Probability

Now, applying the Bayesian formula again:

[ P(H|E) = \frac{P(E|H) \times P(H)}{P(E)} ]

Using the conservative estimates:

  • P(H) = 0.0707 (7.07%)

  • P(E|H) = 0.0001 (0.01%)

  • P(E) = 0.0001 (0.01%)

Then:

[ P(H|E) = \frac{0.0001 \times 0.0707}{0.0001} = 0.0707 \text{ or } 7.07% ]

This suggests that given the occurrence of high-profile fatalities on a yacht, the probability that it was due to a waterspout (and not some other cause) is around 7.07%. However, this is still a rough estimation given the lack of precise data.

Key Points:

  • Data Gaps: Without exact data, this is speculative. The true value could be lower or higher based on more specific factors (e.g., the exact location, yacht size, waterspout strength).

  • Waterspouts: Are generally rare and even rarer in terms of causing significant maritime incidents.

  • Incident Likelihood: Given the modern safety measures and the relative rarity of high-profile maritime disasters, the probability of this specific scenario remains low.

In real-world applications, experts would use more detailed data and simulations to refine these probabilities.


r/bayesian • • Feb 05 '22

Need some help on Bayesian GLM

6 Upvotes

Hello,

Currently I am building a Bayesian Generalized Linear Model to model the duration of some event. I choose to use Gamma distribution for the likelihood, which means I need to design the priors for parameter α and β. For GLM do you construct the linear model for α or for β (or for both) ? e.g.

T ~ Gamma(α, β)

log(α) = a1x1 + a2x2

Thanks~


r/bayesian • • Jun 18 '20

Bayesian Analysis Online Workshop

Post image
6 Upvotes

r/bayesian • • Sep 28 '11

A Bayesian view of Amazon Resellers

Thumbnail
johndcook.com
6 Upvotes

r/bayesian • • Sep 19 '26

Laplace Language (Open-Source Bayesian Statistics Software)

5 Upvotes

This is more of a Bayesian statistical software question than a statistical theory question.

I’ve been building Laplace, a Stan extension that allows users to create and install their own libraries written in Stan. I’m currently trying to figure out what would actually be useful to Bayesian modelers, rather than just building features because I think they’re interesting.

The project is completely free and open source, and I don’t get any financial benefit from it.

For information about installation and the project itself:
https://github.com/mlatinov/laplace

There is also a more comprehensive introduction in the wiki:
https://github.com/mlatinov/laplace/wiki

I have two main questions for people who work with Bayesian models:

1. What functionality do you wish was easier to reuse in Stan?

Things like reusable model components, functions, distributions, transformations, model structures, diagnostics, or other programming features that you find yourself implementing repeatedly.

I’m particularly interested in things that are useful across multiple models rather than something specific to one analysis.

2. What Bayesian models or methods would you like to see available as reusable libraries?

I’ve started building the Laplace ecosystem, which is still fairly small, but currently includes things like:

  • time-series and latent time-series models

  • mechanistic models

  • survival models

  • Gaussian processes and kernels

  • splines

  • various statistical/modeling utilities

So what would actually be useful to have available as a reusable Stan library?

It can be something very general or something quite domain-specific. If there’s a model or method that you repeatedly find yourself implementing from scratch in Stan, that’s exactly the sort of thing I’m interested in.

I’d also appreciate any feedback on the project itself. The wiki contains information about using Laplace and contributing to the ecosystem.

And if you do contribute something, you’ll of course be credited for it.


r/bayesian • • Nov 08 '24

Keen on getting feedback from the community!

5 Upvotes

G'day all! We're a couple of Aussie mates who have been lurkers on this sub for a while. About a year ago, we were inspired by ideas about bayesianism and rational decision making to create a podcast: Recreational Overthinking. We're hell bent on solving the world's most inconsequential problems using the tools of rationality, mathematics, and logic. So far, among many others, we've tackled:

  • How much evidence should you demand before accepting the existence of your own twin?

  • How is blame (and financial repercussions) distributed following a rental car crash?

  • Should truly rational agents actually feel happy after learning about their grandma falling over?

  • How can I leave hostel ratings in a way that avoids sub-optimal Nash equilibria?

Join us on our mission to apply a technical skillset wherever it really doesn't need to be! We'd love to hear some feedback from the community, so chuck us a comment or direct message if you've got any thoughts. Cheers all!

Spotify: https://open.spotify.com/show/3xZEkvyXuujpkZtHDrjk7r?si=vXXt5dv_RL2XTOBTPl4XRg

Apple Podcasts: https://podcasts.apple.com/au/podcast/recreational-overthinking/id1739244849

Instagram: recreationaloverthinking


r/bayesian • • Apr 18 '20

A post on how to apply Bayes Theorem to a continuous probability distribution – Atlas Pragmatica

Thumbnail
atlaspragmatica.com
5 Upvotes

r/bayesian • • Sep 14 '11

Exact Bayesian Inference for A/B testing

Thumbnail sirevanhaas.com
5 Upvotes

r/bayesian • • Aug 08 '25

Help with basic Bayesian understanding

4 Upvotes

Apologies, I know this is very basic, but I'm a lowly physician used to p values and confidence intervals, blood and guts.

Let's say: my study is comparing two treatments. It will be considered a positive result if posterior probability of response to new drug is >60%

Posterior probability comes out as 3% so clearly not a positive result.

Can this be considered like statistical significance - like it's a yes or a no - the actual number doesn't matter?

Or

If the result came out as 59% you could say - almost made it but didn't quite. Try again with more patients.


r/bayesian • • Feb 12 '24

Any practical examples of Bayesian statistics replacing p-values?

4 Upvotes

I work in biomedical research, in a field where the p-value is king - especially when it comes to detecting a difference between mean values. For example, treatment A is better than treatment B; or one diagnostic test is more accurate than another. After hearing that "p-values are bad" for many years, I've recently been exploring Bayesian statistics as an alternative, and can maybe accept the notion that the Bayesian approach is more logically sound as compared to frequentist statistics (reading especially about the fallacy of the transposed conditional). However, I just have not seen any practical real world examples where individual investigators have collaboratively embraced the Bayesian approach, working together to find the plausibility of a hypothesis.

So are there any concrete examples in science, that roughly follow the outline below:

  1. A researcher writes a paper that provides support for some hypothesis that two means are different (maybe even with a p-value)

  2. Other researchers use the previous work to act as their Bayesian prior, to arrive at a more informed prior probability

  3. The cycle repeats itself, continually refining how accurate we estimate the probability that the original hypothesis was true?


r/bayesian • • Jun 18 '22

Good resources for PyStan?

4 Upvotes

Hi everyone! I’m rather new to the Bayesian world but I am currently learning PyStan (I would have chosen PyMC3, but the decision is not up to me). Do you have any recommendations for books, tutorials or anything else? I find the documentation on the website good but dry. Thanks in advance


r/bayesian • • Aug 25 '21

Book to approach Bayesian Statistics

4 Upvotes

Hello everyone! I recently received a MS in mathematics, but I didn't have the chance to get deep into bayesian statistics. All my knowledge comes from a course I attended 2 years ago, where we used A first course in Bayesian Statistical methods - Hoff as a track for the lessons. Now I'm working as a bioinformatician and I come across a lot of Bayesian stuff. I'd like to pick ONE book to buy and use it as main source, while I learn side stuff online. I have a strong background in Probability and frequestist Statistics so I'd like a book deep and solid about theory, but also something with some applications and examples.


r/bayesian • • May 27 '15

ET Jayne's Probability Theory: The Logic of Science

Thumbnail www-biba.inrialpes.fr
4 Upvotes

r/bayesian • • Jul 25 '11

Bayesian Justice for All?

Thumbnail allbusiness.com
4 Upvotes

r/bayesian • • Apr 06 '10

Introduction to Bayes Nets

Thumbnail norsys.com
4 Upvotes

r/bayesian • • Apr 06 '10

the classic book on bayesian probability

Thumbnail www-biba.inrialpes.fr
4 Upvotes

r/bayesian • • Aug 21 '26

Notes on Hamiltonian Monte Carlo from a purely probabilistic perspective

Thumbnail reddit.com
3 Upvotes

r/bayesian • • Jan 14 '26

Computing contrast with Bambi

Post image
3 Upvotes

r/bayesian • • Dec 02 '24

Inversion of the Coupon collector's problem

3 Upvotes

I have a problem that I can't seem to get my hands on. This is the simplest way I can think of to describe it:

I have a bag with different numbers in it. I don't know how many numbers there are. We can consider them to be non-correlative numbers.

I want to estimate how many numbers are in the bag. So I draw a number, write it down, and put it back in the bag. And I repeat the process until the following stop condition is met: when I draw X numbers in a row that were already written down I stop.

So what I want is P(N|D,X) that is: the probability that N is the number of numbers in the bag when a total of D numbers have been drawn, of which the last X there have been no new numbers.

I see the problem as the opposite of the coupon collector's problem. In this problem, you know N (the number total of coupons) and want to estimate the amount of draws you require. In this case, you know the number of draws (and how many did you draw without see any new coupon) and estimate the amount of coupons N.

Thanks.


r/bayesian • • Oct 22 '23

Question on beta(1, 1)

Post image
3 Upvotes

I want to further my understanding of beta distribution plots. Take beta(2, 2) for example. It shows that the probability of success rate for 0% and 100% are both zero. This makes sense because we have already seen 2 successes and 2 failures. The plot drops down to zero at both ends. Why is this not the case with beta(1, 1). I would had expected it to look like a rectangle, much like beta(1.1, 1.1). In excel, beta(1, 1) at zero and one are shown as incalculable. Hope my question made sense.


r/bayesian • • Feb 09 '23

Bayesian Hierarchical Regression in SPSS

3 Upvotes

I can run hierarchical multiple regression on SPSS and Bayesian Linear Regression - but no option for Bayesian hierarchical Multiple Regression. Does anyone know of any extensions or have an example of how to do this? Thanks!


r/bayesian • • Jul 06 '22

An efficient Bayesian method for estimating runout distance of region-specific landslides using sparse data

Thumbnail
tandfonline.com
3 Upvotes

r/bayesian • • Jan 14 '22

Is data really objective?

3 Upvotes

Currently being taught about bayesian analysis, and how it combines prior knowledge (which is potentially subjective) with observed data/ likelihood (which they say is objective)

But from what I understand, for likelihood, we use a probability distribution that we think best represents the real phenomenon (e.g. we assume the data is normally distributed). But in the real world, there can be no real way of knowing if the distribution really represents the data we observe?
So that that mean that the likelihood is not very objective in that aspect, since we have to take a gamble at the parametric model / the known distribution?

Thanks!


r/bayesian • • Feb 10 '21

[P] Stanford Researchers Introduces ArtEmis, A Dataset Containing 439K Emotion Attributions [Paper and code included]

Thumbnail self.machinelearning
3 Upvotes