From 96f7ca793683f00b875562741c19d9edc5cd409e Mon Sep 17 00:00:00 2001 From: rubegar <ruben.garcia.vazquez@estudiantes.uva.es> Date: Wed, 19 Jun 2024 17:57:16 +0000 Subject: [PATCH] Upload New File --- confianza.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 confianza.py diff --git a/confianza.py b/confianza.py new file mode 100644 index 0000000..a327142 --- /dev/null +++ b/confianza.py @@ -0,0 +1,10 @@ +import csv +import math + +def confianza(xa, xb, sa, sb, na, nb): + d = xa - xb + s = math.sqrt(((sa ** 2) / na) + ((sb ** 2) / nb)) + intervalo = (d - 1.96 * s, d + 1.96 * s) + return intervalo + +print(confianza(11226, 3342.3, 7350.85, 1651.23, 1912, 6424)) \ No newline at end of file -- GitLab