What is the Probability of Success in Comparing Normal Distributions?

  • MHB
  • Thread starter Chatman100
  • Start date
  • Tags
    Computing
In summary, the code in the MATLAB simulation calculates the probability of success for an experiment in which a random variable is compared to the elements of a vector.
  • #1
Chatman100
2
0
Hello dear friends,
I need your help with this probability problem.
I have random variable x1 which is normally distributed with mean m1 and standard deviation sigma1.
The vector of random variables X0 is of N elements, where each element is normally distributed with zero mean and standard deviation sigma0.
Now we do an experiment. In each experiment we cast x1 and X0. Then we compare x1 to the elements of X0. If x1 is greater than all the elements in X0 the experiment is successful, otherwise it is a failure. This experiment is repeated K times.
I would like to calculate the probability of success.
Below is the code of the MATLAB simulation:
m0 = 0; %Mean of the elements in X0
sigma0 = 1; %Standard deviation of the elements in X0
m1 = 4.3; %Mean of the elements in x1
sigma1 = 1.2; %Standard deviation of the elements in x1

N = 1000; %Number of elements in X0
K = 800; %Number of experiments
X0 = randn(K, N)*sigma0 + m0;
x1 = randn(K, 1)*sigma1 + m1;

success_flag = zeros(K, 1); %Allocation
for k = 1:K
success_flag(k) = sum(x1(k) > X0( k, : )) == N;
end
success_percentage = 100 * sum(success_flag) / K;
disp(['Success percentage sim: ' num2str(success_percentage)]);


Looking forward to your help.
 
Physics news on Phys.org
  • #2
Chatman100 said:
Hello dear friends,
I need your help with this probability problem.
I have random variable x1 which is normally distributed with mean m1 and standard deviation sigma1.
The vector of random variables X0 is of N elements, where each element is normally distributed with zero mean and standard deviation sigma0.
Now we do an experiment. In each experiment we cast x1 and X0. Then we compare x1 to the elements of X0. If x1 is greater than all the elements in X0 the experiment is successful, otherwise it is a failure. This experiment is repeated K times.
I would like to calculate the probability of success.

I didn't see anything about dependencies between $x_1$ and components of the random vector, and whether said components are independent of each other. Note there isn't a nice closed form expression for the CDF of gaussians so you may need to fall back on numerical integration or some kind of approximation in order to "calculate" the probability of success.

the most conceptually straightforward approach is to calculate the orderstatistics for the maximum component of the random vector, call the CDF $\Phi$ and do $\int_{-\infty}^\infty \Phi(t)\cdot f(t) dt$ where $f(t)$ is the density of the random variable $x_1$. Technically the integral here may be messy, and adjustments are needed if $x_1$ is not independent from $\mathbf x$ .
= = = =

Supposing they are independent (or at least $\mathbf x$ and $x_1$ are jointly normally distributed as an N+1 dimensional vector) a sneakier approach would be to calculate $\mathbf y := \mathbf x - x_1 \mathbf 1$ which is a new $n$ dimensional jointly normal random vector with the same means as $\mathbf x$ but shifted down by the mean of $x_1$ in each case (so means of $-4.3$ for each component of $\mathbf y$ if I read your post right). The variances add if $x_1$ is independent from components of $\mathbf y$, otherwise a covariance correction is needed. This is another reason why you need to be careful about dependencies.

The end game then is to calculate the probability the $\mathbf y$ is non-postive (or the complementary item of it being non-negative). You can numerically try to do the integrals here, though if you are doing estimates/ approximations I have some clever adjustments in mind.
= = = =
That's for the probability of success associated with one experiment. After that we can do adjustments for $k$ experiments (presumably they are independent and you get a binomial distribution of successes)
 
  • #3
Thank you for your answer. I will think carefully and will try to understand the things you wrote.
Most appreciated.
 

What is computing success percentage?

Computing success percentage refers to the measure of how often a computer program or algorithm is able to accurately complete a task or provide a correct output. It is often used to evaluate the effectiveness and efficiency of a program.

How is computing success percentage calculated?

The computing success percentage is calculated by dividing the number of successful outcomes by the total number of attempts and multiplying by 100. This provides a percentage that represents the rate of success for a given program or algorithm.

What factors can affect computing success percentage?

There are several factors that can affect computing success percentage, including the complexity of the task, the quality of the code, and the amount of data being processed. Other factors such as hardware limitations or external influences can also impact the success rate.

Why is computing success percentage important?

Computing success percentage is important because it allows for the evaluation and improvement of computer programs and algorithms. By measuring the success rate, developers can identify areas for improvement and optimize their code for better performance.

How can computing success percentage be improved?

There are several ways to improve computing success percentage, including optimizing code for efficiency and accuracy, testing and debugging thoroughly, and utilizing feedback and data analysis to identify and address any issues. Continuous improvement and refinement of the program can also lead to an increase in success percentage over time.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
846
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
13
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
926
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
866
Back
Top