private void ListChanceOfAllSingleRatesSuccess() { Console.WriteLine("|||\n|| List of the chances of all specific rates [r] of success\n" + "|| given the probability of a success [p] among [n] elements: X~b(n,p) P(X=r)\n||"); CheckValuesForBadness(); bool longList = DecideListLength(); for (int i = 0; i <= xVar.number; i++) { double binomPdf = BinomialStochasticVariables.binomPdf(xVar, i); if (binomPdf > 0.0002 | longList) { ColorCodeIntervals(binomPdf); Console.WriteLine("||| Chance of {0} success = {1}% :\tX~b( {2} , {3} ) P(X = {0}) = {4}\t\t {5}", i, 100 * Math.Round(binomPdf, 4), xVar.number, xVar.probability, Math.Round(binomPdf, 5), Access.Dash(binomPdf)); } } Console.ResetColor(); Console.ReadLine(); }
private void ChanceOfSingleRateSuccess() { Console.WriteLine("|||Calculate the chance of a specific rate [r] of success\n" + "|| given the probability of a success [p] among [n] elements:\t X~b(n,p) P(X=r)\n||"); CheckValuesForBadness(); Rate = FetchRate(); Console.WriteLine("||\n||| The likelyhood of {0} success' = {1}% : X~b( {2} , {3} ) P(X = {0}) = {4}\n||", Rate, 100 * Math.Round(BinomialStochasticVariables.binomPdf(xVar, Rate), 3), xVar.number, xVar.probability, Math.Round(BinomialStochasticVariables.binomPdf(xVar, Rate), 5)); Console.WriteLine("|| Enter to continue."); Console.ReadLine(); }