verisimiltude - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of verisimiltude.php
- <?php
- $pi= 3.1416;
- $sd = 10;
- $mean = 20; // cambiar esto pr ej. (30,40,50,60)
- $answer = [];
- foreach ([38.6, 42.4, 57.5, 40.5, 51.7, 67.1, 33.4, 60.9, 64.1, 40.1, 40.7, 6.4 ] as $val){
- $value = exp(-1/2* pow((($val-$mean)/$sd ),2));
- array_push($answer,$value);
- }
- $value2 = 1/sqrt(2*$pi*$sd);
- array_push($answer,$value2);
- //print_r($answer);
- echo array_product($answer);
File Description
- verisimiltude
- PHP Code
- 18 Nov-2017
- 381 Bytes
You can Share it:
Latest PHP Pastes