We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c597bf commit 5887dc6Copy full SHA for 5887dc6
.github/workflows/calculate-error-margin.sh
@@ -3,14 +3,13 @@
3
# Input variables
4
FAILURE_COUNT=$1
5
SAMPLE_SIZE=$2
6
-CONFIDENCE_LEVEL=0.95
7
8
# Calculate sample proportion
9
p_hat=$(echo "scale=4; $FAILURE_COUNT / $SAMPLE_SIZE" | bc)
10
11
# Determine z-score for the given confidence level
12
-# For 95% confidence level, z-score is approximately 1.96
13
-z=1.96
+# For 90% confidence level, z-score is approximately 1.645
+z=1.645
14
15
# Calculate standard error
16
SE=$(echo "scale=6; sqrt($p_hat * (1 - $p_hat) / $SAMPLE_SIZE)" | bc)
0 commit comments