1.0.35 • Published 1 year ago

@gabrielrufino/samplesize v1.0.35

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
1 year ago

Package to determine the correct sample size for a survey

What is Sample Size?

Every survey needs an ideal number of responses according to the survey's target audience. This is where a statistical calculation that determines the desired sample size comes in.

The calculation is based on three important variables: population size, confiability rate and margin of error.

  • N: The population size
  • z: Score calculated from the confiability rate
  • e: Margin of error
  • p: Constant, generally 0.5

More information here.

Getting started

Install the package:

npm install @gabrielrufino/samplesize

Calculate the sample size:

import SampleSize from '@gabrielrufino/samplesize'

const size = SampleSize.calculate({
  population: 3000,
  confidence: SampleSize.confidences['90%'],
  errorMargin: 0.05,
})

console.log(size) // 250

License

UNLICENSED

1.0.35

1 year ago

1.0.34

1 year ago

1.0.33

1 year ago

1.0.32

1 year ago

1.0.31

1 year ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.30

2 years ago

1.0.23

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.20

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago