Applying Bayesian Inference to Test Hypothesis on 100 Samples of Random Numbers

In summary, the strength of Bayesian analysis lies in its ability to incorporate expert knowledge into the analysis. In order to test for the hypothesis of bias towards certain numbers, one must define a probability distribution and set a threshold for determining bias. Both Bayesian and non-Bayesian statistics do not provide a definite answer, but rather a probability. When considering varying sample sizes and trends, it is important to clearly define and understand these factors in order to avoid bias and incorrect conclusions. Bayesian analysis requires a precise and well-defined example to be effective.
  • #1
scalpmaster
35
0
how is bayesian inference actually applied?
Say I have (100samples) a series of random numbers between 1 to 10.
How do I test for the hypothesis that "there is a bias for the numbers 5,7" ?
 
Physics news on Phys.org
  • #2
scalpmaster said:
how is bayesian inference actually applied?
Say I have (100samples) a series of random numbers between 1 to 10.
How do I test for the hypothesis that "there is a bias for the numbers 5,7" ?

The strength of Bayesian analysis is that it encourages experts to use their knowledge instead of leaving out details of the problem in order to fit it into some textbook type of exercise. If this is a real world problem, you have to consider what you know about the causes of the bias or examples of other series of numbers where you understand the bias.

If you are making the problem up merely to work an example of Bayesian analysis, then we can consider how to define a probability distribution on "bias". You could use a "probability distribution of probability distributions". For example, let [itex] p_i [/itex] be the probability of the number [itex] i [/itex] and assume that any vector of probabilities [itex] p_1, p_2,...p_n [/itex] is equally likely, subject to the condition that the probabilities add to 1 and are each between 0 and 1. If you are trying to make a "yes or no" judgment on "bias", you have to define what that means. For example, does a "bias" in favor of 5 mean that [itex] p_5 [/itex] was at least 0.15?.

We can discuss this further if you can refine your goals. It's often most convenient to do Bayesian analysis by Monte-Carlo simulations.
 
  • #3
Stephen Tashi said:
If you are making the problem up merely to work an example of Bayesian analysis, then we can consider how to define a probability distribution on "bias". You could use a "probability distribution of probability distributions". For example, let [itex] p_i [/itex] be the probability of the number [itex] i [/itex] and assume that any vector of probabilities [itex] p_1, p_2,...p_n [/itex] is equally likely, subject to the condition that the probabilities add to 1 and are each between 0 and 1. If you are trying to make a "yes or no" judgment on "bias", you have to define what that means. For example, does a "bias" in favor of 5 mean that [itex] p_5 [/itex] was at least 0.15?.
We can discuss this further if you can refine your goals. It's often most convenient to do Bayesian analysis by Monte-Carlo simulations.

This is a basic example(1to10) just to try Bayesian analysis.
Let bias be expressed as Pi>Pb, where Pb is user defined, e.g 0.15
The goal is simply to find out if there was user defined level of bias for certain numbers in different historical sample set sizes, e.g last 30draws, last 70draws, last 100draws, etc besides merely looking at the corresponding frequencies for each number for each timeframe.
I.e. At which timeframe, there was most number of bias shown even though in the long run Pi for all numbers converges to 0.1?
 
Last edited:
  • #4
Neither Bayesian or non-Bayesian statistics gives you a definite yes-or-no answer to most problems. In Bayesian statistics, the answer to the question "Is [itex] P_5 > 0.15 [/itex]" will have a certain probability. (It's a "probability of a probability" in this case, which might be a confusing thought.)

In non-Bayesian statistics, you would assume a definite distribution for the numbers, you would compute the probability of observing your data and you would set some abritary limit on how improbable the data would be in order to "reject" or "accept" your original assumption.

When you start mentioning varying sample sizes and "trends", you are getting into complications that you need to be clear about. People who look for "trends" in data can often fool themselves. Are you assuming the "bias" varies over time?

If you are looking for an example to use to understand Bayesian analysis then you must define a specific example and do so precisely. Bayesian analysis doesn't do a translation from the ambiguous language of everyday speech into mathematics. The user of Bayesian analysis must do that.
 
  • #5


Bayesian inference is a statistical method that uses prior knowledge and data to update and quantify the belief in a hypothesis. In order to apply Bayesian inference to test the hypothesis of a bias for the numbers 5 and 7, you would need to follow these steps:

1. Define the hypothesis: The first step is to clearly define the hypothesis you want to test. In this case, the hypothesis is that there is a bias for the numbers 5 and 7 in the sample of random numbers.

2. Determine the prior belief: The prior belief is the initial belief in the hypothesis before any data is collected. In this case, the prior belief would be that there is no bias for the numbers 5 and 7.

3. Collect data: Next, you would need to collect the 100 samples of random numbers between 1 and 10.

4. Calculate likelihood: The likelihood is the probability of observing the data given the hypothesis is true. In this case, the likelihood would be the probability of observing the numbers 5 and 7 in the 100 samples of random numbers.

5. Update the belief using Bayes' theorem: Bayes' theorem states that the posterior belief is equal to the prior belief multiplied by the likelihood, divided by the evidence. In this case, the posterior belief would be the updated belief in the hypothesis after considering the data.

6. Interpret the results: The updated belief in the hypothesis can be interpreted as the probability that the hypothesis is true given the data. If the updated belief is high, then there is strong evidence for the hypothesis. If the updated belief is low, then there is weak evidence for the hypothesis.

In summary, Bayesian inference can be applied by defining the hypothesis, determining the prior belief, collecting data, calculating the likelihood, updating the belief using Bayes' theorem, and interpreting the results. It is a useful tool for testing hypotheses and making inferences based on data.
 

1. How does Bayesian inference work?

Bayesian inference is a statistical method that uses prior knowledge and data to estimate the probability of a hypothesis being true. It involves updating our belief about the hypothesis as we gather more data, resulting in a more accurate estimate.

2. What are the advantages of using Bayesian inference for hypothesis testing?

One advantage of using Bayesian inference is that it allows for the incorporation of prior knowledge and beliefs, which can result in more accurate and meaningful conclusions. It also provides a measure of uncertainty in the form of probability, rather than just a yes or no answer.

3. How do you apply Bayesian inference to test a hypothesis on 100 samples of random numbers?

To apply Bayesian inference to test a hypothesis on 100 samples of random numbers, you would first need to specify a prior belief about the hypothesis. Then, you would use Bayes' theorem to update this belief as you collect data from the 100 samples. The resulting posterior distribution can then be used to evaluate the hypothesis.

4. What are some common misconceptions about Bayesian inference?

A common misconception about Bayesian inference is that it always requires strong prior beliefs, which can lead to biased results. However, the strength of the prior belief can be adjusted and updated as more data is collected, resulting in a more objective conclusion.

5. Can Bayesian inference be used for any type of hypothesis testing?

Bayesian inference can be used for most types of hypothesis testing, including simple and complex hypotheses. It is particularly useful when dealing with small sample sizes or when prior knowledge is available. However, it may not be the best approach in certain situations, such as when the data is heavily skewed or the sample size is very large.

Similar threads

  • Sticky
  • Set Theory, Logic, Probability, Statistics
Replies
13
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
371
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
336
  • Set Theory, Logic, Probability, Statistics
Replies
26
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
887
  • Set Theory, Logic, Probability, Statistics
Replies
11
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
11
Views
391
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
909
Back
Top