VOOZH about

URL: https://www.geeksforgeeks.org/python/systematic-sampling-in-pandas/

⇱ Systematic Sampling in Pandas - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Systematic Sampling in Pandas

Last Updated : 13 Sep, 2021

Sampling is the method where one can take subset (Sample) from the given data and will investigate on the sample without investigating each individual thing of data. For instance, suppose in a College, someone wants to check the average height of Students who are Studying in the college. One way is to Collect data of all student and will calculate that but this task is very time-consuming. Thus, sampling is used. So, the solution is that during the Recess, randomly choose Students from Canteen and measure their height and will calculate the average height from that Subset of Student's.

👁 Image

Types Of Sampling :

👁 Image
Sampling

Systematic Sampling

Systematic Sampling is defined as the type of Probability Sampling where a researcher can research on a targeted data from large set of data. Targeted data is chosen by selecting random starting point and from that after certain interval next element is chosen for sample. In this a small subset (sample) is extracted from large data.

Suppose that size of Data is D and N will be the Size of Sample that we want to Select. So according to Systematic Sampling :

Interval = (D/N)

Suppose (D/N) = J

So when we choose first random element E from Data , the next element for Sample would be (E+J)

Example : Total Size of Data  = 50 (1 to 50)

          We want elements in  Sample = 5

          Interval = 50/5 = 10 .

It means in a sample we want gapping of 10 elements Systematically.

Suppose i randomly choose element first Sample Element  = 5

So next would be 5+10 = 15

                 15+10= 25

                 25+ 10 =35

                 35+10  = 45

So, 

Sample = { 5,15,25,35,45 }

Diagrammatically, 

👁 Image

Approach:

  • Take Data.
  • Extract Systematic Sample from large Data.
  • Print the Average of Sample Data.

Program: 

Output:

👁 Image
👁 Image

Example: Print Average of Sample Data

Output:

👁 Image

Types of Systematic Sampling 

Systematic Sampling is of three types as depicted below :

👁 Image
Types of Systematic Sampling

Systematic Random Sampling:

In systematic random Sampling, random starting point is chosen and after that from that random starting point systematic sampling is applied.

Approach:

  • Get data
  • Choose a random starting point
  • Apply systematic approach to the data
  • Perform operations as intended

Example: 

Output:

👁 Image

Linear Systematic Sampling :

Linear Systematic Sampling is a type of systematic sampling where the sample are selected using linear approach. Linear approach in the sense that after particular interval the sample is selected from the large data and after that operations are performed on the Selected Sample.

The elements are chosen between the range starting_random_number to last_element -1.

Approach:

  • Get data
  • Select data from the dataset after a particular interval
  • Perform operations as intended

Example:

Output:

👁 Image

Circular Systematic Sampling

In Circular Systematic Sampling, a sample again starts from the same point after ending. Basically, while selecting samples systematically and when ending element is reached, once again the selecting of sample will start from the beginning until all the elements of sample are selected. It means operations are performed on all the data which is selected using Circular Systematic Sampling.

Approach:

  • Get data
  • Select samples systematically
  • Once end is reached, restart
  • Perform operations as intended

Program:

Output:

👁 Image
Comment