Created
October 16, 2023 11:01
-
-
Save saimadhu-polamuri/49d1b5475629577f77dbcb6955af31be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.stats import kstest | |
import numpy as np | |
# Generate a random sample from a normal distribution | |
sample = np.random.normal(loc=0, scale=1, size=100) | |
# Perform goodness-of-fit KS test against a normal distribution | |
statistic, pvalue = kstest(sample, 'norm') | |
print('Test statistic:', statistic) | |
print('P-value:', pvalue) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment