K
K
konellemhs2020-02-16 17:01:35
PHP
konellemhs, 2020-02-16 17:01:35

Poisson distribution in phpspreadsheet?

I ran into a problem how to display the results of the Poisson distribution from the Excel table using "phpspreadsheet"
The getCalutatedValue () method leads to a fatal error and overwrites the Excel file. Please let me know if there is a way to do this? And how to do it? Where to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
konellemhs, 2020-02-17
@konellemhs

1. connect the class:

use \PhpOffice\PhpSpreadsheet\Calculation\Statistical;

2. We call the static method:
$poisson = Statistical::POISSON($x,$stat, $bool);
The principle is the same as in excel itself, the POISSON.DIST function (x; average; true / false);
I cannot say for the accuracy of the calculations, I compared this script with the values ​​​​purely in excel, they coincide with good accuracy (4 decimal places). This is more than enough for my purposes.
Again, after searching the Internet, I did not find a single article on this topic, so I will leave it here as a solution, MB will come in handy for someone)))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question