Skip to content

Instantly share code, notes, and snippets.

@cgarciagl
Created March 28, 2012 04:34
Show Gist options
  • Save cgarciagl/2223638 to your computer and use it in GitHub Desktop.
Save cgarciagl/2223638 to your computer and use it in GitHub Desktop.
var
C: TChi_square_distribution;
P: Single;
begin
// Creamos la instancia
// en este caso con 4 grados de libertad
C := TChi_square_distribution.create(4);
// Obtenemos la probabilidad acumulada al valor 5
P := C.prob_between(0, 5);
// Probabilidad X >= 5
P := 1 - C.prob_between(0, 5);
// El valor de la función de densidad en 10
D := C.density(10);
C.Free;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment