I am trying to compute CDF of historical data ( weekly change in CDS spread) using kernel density estimation. The original data has 300 observation. I uploaded data from excel

 '(citi = Import["CorrelD.xlsx", {"Data", "data", All, 1}]'

CDF is computed using below function

 'd = SmoothKernelDistribution[citi] 

I can see the CDF graph computed as expected. How can I get the CDF data out in excel please?


1 Answer 1


Simulate data

data = RandomVariate[PowerDistribution[1, 2.5], 10^3];
dist = SmoothKernelDistribution[data];
Plot[CDF[dist, x], {x, 0, 1}]

Mathematica graphics

Export Data

Export["cdf.xls", Table[{x, CDF[dist, x]}, {x, 0, 1, .01}]];

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.