Moda y mediana de una distribución estadística
Author: Pepe

10 datos

7 datos

A

Datos:

Media aritmética

Mediana

10 datos

c = false
b = true
a = Segment((0, 0), (10, 0))
C = Point(a)
D = Point(a)
E = Point(a)
F = Point(a)
G = Point(a)
H = Point(a)
I = Point(a)
J = Point(a)
A = Point(a)
B = Point(a)
listax7 = Sort({x(A), x(B), x(C), x(D), x(E), x(F), x(G)})
listax10 = Sort({x(A), x(B), x(C), x(D), x(E), x(F), x(G), x(H), x(I), x(J)})
listarayas1 = Sequence(Segment[(k, -0.1), (k, 0.1)], k, 0, 10)
medi = If(c ≟ true, Median[listax10], Median[listax7])
listarayas2 = Sequence(Segment[(k, -0.05), (k, 0.05)], k, 0, 10, 0.5)
med = If(c ≟ true, mean[listax10], mean[listax7])
texto8: "Media aritmética: " + med + ""
texto9: "Mediana: " + medi + ""
Pmedia: (med, 0)
Pmediana: (medi, 0)
u = Vector((medi, -1), (medi, -0.1))
v = Vector((med, 1), (med, 0.2))
texto1 = If(c ≟ false, TableText[{listax7}, "l_|h"], TableText[{listax10}, "l_|h"])