Calculate number of probabilities

51 Views Asked by At

I want to calculate a number of probabilities of a+b+c=1

For a vary from 0 to 1 with an incrementing of 0.1

For b vary from 0 to 1 with an incrementing of 0.1

For c vary from 0 to 1 with an incrementing of 0.1

The question is: how many cases or probabilities can i have from these conditions? Thank u very much!

1

There are 1 best solutions below

0
On

I agree that this is, perhaps, directed to math.stackexchange.com. Just for fun and assuming an interpretation of the question: if the aim is to find the number of ways of selecting a triple (with replacement) from {0,0.1,0.2,...,1} that sums to 1. This is equivalent to integer partitioning 10 (just divide by 10).

Some approaches to counting:

tup = Tuples[Range[0, 10], 3];
res = Pick[tup, Plus @@@ tup, 10];
Length[res]

yields 66

or

ip = PadRight[IntegerPartitions[10, 3]];
c = Total@(Multinomial @@@ (Tally[#][[All, 2]] & /@ ip))

yields 66

You can display:res/10.:

{{0., 0., 1.}, {0., 0.1, 0.9}, {0., 0.2, 0.8}, {0., 0.3, 0.7}, {0., 
  0.4, 0.6}, {0., 0.5, 0.5}, {0., 0.6, 0.4}, {0., 0.7, 0.3}, {0., 0.8,
   0.2}, {0., 0.9, 0.1}, {0., 1., 0.}, {0.1, 0., 0.9}, {0.1, 0.1, 
  0.8}, {0.1, 0.2, 0.7}, {0.1, 0.3, 0.6}, {0.1, 0.4, 0.5}, {0.1, 0.5, 
  0.4}, {0.1, 0.6, 0.3}, {0.1, 0.7, 0.2}, {0.1, 0.8, 0.1}, {0.1, 0.9, 
  0.}, {0.2, 0., 0.8}, {0.2, 0.1, 0.7}, {0.2, 0.2, 0.6}, {0.2, 0.3, 
  0.5}, {0.2, 0.4, 0.4}, {0.2, 0.5, 0.3}, {0.2, 0.6, 0.2}, {0.2, 0.7, 
  0.1}, {0.2, 0.8, 0.}, {0.3, 0., 0.7}, {0.3, 0.1, 0.6}, {0.3, 0.2, 
  0.5}, {0.3, 0.3, 0.4}, {0.3, 0.4, 0.3}, {0.3, 0.5, 0.2}, {0.3, 0.6, 
  0.1}, {0.3, 0.7, 0.}, {0.4, 0., 0.6}, {0.4, 0.1, 0.5}, {0.4, 0.2, 
  0.4}, {0.4, 0.3, 0.3}, {0.4, 0.4, 0.2}, {0.4, 0.5, 0.1}, {0.4, 0.6, 
  0.}, {0.5, 0., 0.5}, {0.5, 0.1, 0.4}, {0.5, 0.2, 0.3}, {0.5, 0.3, 
  0.2}, {0.5, 0.4, 0.1}, {0.5, 0.5, 0.}, {0.6, 0., 0.4}, {0.6, 0.1, 
  0.3}, {0.6, 0.2, 0.2}, {0.6, 0.3, 0.1}, {0.6, 0.4, 0.}, {0.7, 0., 
  0.3}, {0.7, 0.1, 0.2}, {0.7, 0.2, 0.1}, {0.7, 0.3, 0.}, {0.8, 0., 
  0.2}, {0.8, 0.1, 0.1}, {0.8, 0.2, 0.}, {0.9, 0., 0.1}, {0.9, 0.1, 
  0.}, {1., 0., 0.}}

Hence, 'probability a triple at random will sum to 10` is 66/11^3 $\approx 0.0495868$.