Can I use the kstest function to check if the data have a CDF defined by myself?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Isuru Udayangani
el 7 de En. de 2016
Respondida: Brendan Hamm
el 7 de En. de 2016
Hi!
I have a vector of random variables. I want to check whether they are generated from a power law distribution. I have my own function to calculate their CDF's. Can I still use this CDF matrix for the kstest function in matlab? (power law distribution is not included in the list of CDF distributions available for the function)
Thanks.
0 comentarios
Respuesta aceptada
Brendan Hamm
el 7 de En. de 2016
Yes, if you have a function that calculates the CDF of the distribution you can calculate the CDF at your sample values and pass this into the kstest function.
For a column vector of sample values x and CDF function F(x), create a matrix such that:
myCDF = [x F(x)];
and call:
kstest(x,'CDF',myCDF);
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!