Probabilistic (or randomized) decision trees can be used to compute Boolean functions. We consider two types of probabilistic decision trees - one has a certain probability to give correct answer (but can also give nothing at all) and is not allowed to give wrong answers, but other always manages to give correct answer, but may require more computation. We provide a method, which can be used to construct the optimal probabilistic decision tree for a given Boolean function. The proposed method is based on optimization. To reduce the number of parameters in optimization problem, we take into account the symmetries of given function. As an example we consider a very symmetric Boolean function ("Fano plane function") with 7 arguments and construct the optimal decision tree for it using our method. The first kind of tree will guess the value of this function with probability 17/28 in the worst case, but the second will ask in average about 5 questions even if always the worst-case...