How to Calculate the Sampling Error

Python

A sampling error is the difference between the parameter of a population (a descriptive statistic from the population) and a statistic (the same descriptive statistic from a sample of the population).

 1|  parameter = population['col1'].mean()
 2|  statistic = sample['col1'].mean()
 3|  sampling_error = parameter - statistic
Did you find this snippet useful?

Sign up for free to to add this to your code library