Tag:probability

  • Calculation of prizes in the lottery draw probability

    Time:2022-10-8

    //key: award key, value: the probability of winning the prize or the number of copies $array = [‘key1’ => 20, ‘key2’ => 40, ‘key3’ => 30, ‘key5’ => 10]; //return: return the winning key $fun = function ($array) { asort($array);//Probability size sorting, allocation interval, 0-10-20-30-40; $randNum = mt_rand(1, array_sum($array));//random number //print_r($randNum . PHP_EOL); //Interval judgment […]

  • Introductory Tutorial for Maximum Likelihood Estimation (MLE)

    Time:2022-10-7

    What is Maximum Likelihood Estimation (MLE) Maximum Likelihood Estimation is a technique that can generate the most likely estimates of the parameters of any distribution that fit the data. It is an approach to a common problem in modeling and statistics – fitting a probability distribution to a dataset. For example, assuming the data comes […]