Probability of two adjacent cells being below gaussian percentile

Hello, I have a matrix, whose data is described by a gaussian curve. Now I have a probability of 8%, that the data falls below a threshold and is therefore faulty. Is there a way I can calculate the probability of at least two neighbouring cells of the matrix (each cell has 8 neighbours, counting diagonals!) being faulty? Any pointing in the right direction would be appreciated.
Thank you

Answers (1)

Doing it properly can be tricky.
For one "bad" elements - you have an average of 8% - it has 8 neighbours (actually, on average slightly less, but lets not worry about the boundaries) There is a 0.92 probability that one neighbour doesn't fail, so there is a 0.92^8 probability that no neighbour fails (51%).
BUT! That makes the assumption that there is no spatial relationship between elements, when there probably is, so that 51% is probably an underestimate.
Alternatively, you can actually measure the properties of your matrix by thresholding it, and either convolving it with something to highlight pairs of bad elements or by objectising it to get good descriptions of the clumps (bwlabel & regionprops)

4 Comments

So assuming there is no spatial relationship, is it therefore possible to say that the probability of an error due to 2 bad elements is 0.51*0.8, so approximately 4%?
No. Assuming no spatial relationship, it is possible to say that there is a 1-0.92^8 chance that any given bad pixel will have at least one bad neighbour.
So is there a way to express this as a probability of error for the entire Matrix?
This is where the "trickiness" comes in. If your matrix is small - say, 7 x 7, you've got 25 elements where the normal stats apply - and 24 where they're improved due to the boundaries - for the central 25 elements , you've got on average, 2 bad elements, and half of those elements will be in a "clump"
If you have a typical image-sized matrix (at least 100x100), its not really a "probability of having two bad elements next to each other", it's more like a "how many pairs of bad elements do I expect on average?" - and then, how do you deal with clumps of 3, 4, and 5 etc. bad pixels.

Sign in to comment.

Categories

Asked:

T
T
on 27 Aug 2014

Commented:

on 27 Aug 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!