I need to draw cdf of integer values read from a file. I am following the example here. I am not sure how I can normalize the data for pdf and then compute cdf.
import numpy as np
from pylab import *
with open ("D:/input_file.txt", "r+") as f:
data = f.readlines()
X = [int(line.strip()) for line in data]
Y = exp([-x**2 for x in X]) # is this correct?
# Normalize the data to a proper PDF
Y /= ... # not sure what to write here
# Compute the CDF
CY = ... # not sure what to write here
# Plot both
plot(X,Y)
plot(X,CY,'r--')
show()