Skip to content

Commit 5887dc6

Browse files
tkerseypaulz
authored andcommitted
update confidence level to 90%
Signed-off-by: Paul Zabelin <[email protected]>
1 parent 0c597bf commit 5887dc6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/calculate-error-margin.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
# Input variables
44
FAILURE_COUNT=$1
55
SAMPLE_SIZE=$2
6-
CONFIDENCE_LEVEL=0.95
76

87
# Calculate sample proportion
98
p_hat=$(echo "scale=4; $FAILURE_COUNT / $SAMPLE_SIZE" | bc)
109

1110
# Determine z-score for the given confidence level
12-
# For 95% confidence level, z-score is approximately 1.96
13-
z=1.96
11+
# For 90% confidence level, z-score is approximately 1.645
12+
z=1.645
1413

1514
# Calculate standard error
1615
SE=$(echo "scale=6; sqrt($p_hat * (1 - $p_hat) / $SAMPLE_SIZE)" | bc)

0 commit comments

Comments
 (0)