escala = 1
h = 0.5
X_i: {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}
A = Corner(pic1, 1)
b: random() + 0 * x(A)
N = 1000 (slider from 1 to 1000, step 1)
tirada = Sequence(2 + floor(6 * random()) + floor(6 * random() + 0 * b * i), i, 1, N)
n_i = Sequence(contar[Element[X_i, i], tirada], i, 1, Length[X_i])
f_i = aplica(x / N, n_i)
B = Corner(pic1, 2)
media: suma[Lproducto[X_i, n_i]] / N
F_i = acumula(f_i)
posmed = buscamayoroigual(0.5, F_i)
mediana = Element(X_i, posmed)
desviación: sqrt(suma[Lproducto[aplica[(x - media)^(2), X_i], f_i]] / N)
histo = histo(X_i, f_i, h, escala)
moda = Sequence(If[Element[f_i, k] ≟ Max[f_i], ">>>", ""], k, 1, Length[f_i])
text2: "\bgcolor{f00000}{\begin{tabular}{c}  n_i" + "&&&&\quote" + (Sequence["\\" + (Element[n_i, i]) + "&&&&", i, 1, Length[n_i]]) + "\end{tabular}\]}"
text1: "\bgcolor{ffff00}{\begin{tabular}{c}  X_i" + "&&&&\quote" + (Sequence["\\" + (Element[X_i, i]) + "&&&&", i, 1, Length[X_i]]) + "\end{tabular}\]}"
text3: "\begin{tabular}{c}  mode" + "&&&&\quote" + (Sequence["\\" + (Element[moda, i]) + "&&&&", i, 1, Length[moda]]) + "\end{tabular}\]"

Tool: suma
suma listas de numeros
Input: L1
Output: a

L1: {0.667998252, 1.0265239400000001, 0.7606421360000001, 0.3896676000000001, 0.13945537200000005, 1.041039999999984E-4, 0.15158534399999993, 0.4309909799999999, 0.8424141919999999, 0.9076858559999998, 0.6062562239999999}
L2 = Sequence(If[i ≤ Length[L1], Element[L1, i], 0 * Element[L1, 1]], i, 1, 10 * ceil(Length[L1] / 10))
L3 = Sequence(Element[L2, i] + Element[L2, i + 1] + Element[L2, i + 2] + Element[L2, i + 3] + Element[L2, i + 4] + Element[L2, i + 5] + Element[L2, i + 6] + Element[L2, i + 7] + Element[L2, i + 8] + Element[L2, i + 9], i, 1, Length[L2], 10)
L4 = Sequence(If[i ≤ Length[L3], Element[L3, i], 0 * Element[L3, 1]], i, 1, 10 * ceil(Length[L3] / 10))
L5 = Sequence(Element[L4, i] + Element[L4, i + 1] + Element[L4, i + 2] + Element[L4, i + 3] + Element[L4, i + 4] + Element[L4, i + 5] + Element[L4, i + 6] + Element[L4, i + 7] + Element[L4, i + 8] + Element[L4, i + 9], i, 1, Length[L4], 10)
L6 = Sequence(If[i ≤ Length[L5], Element[L5, i], 0 * Element[L5, 1]], i, 1, 10 * ceil(Length[L5] / 10))
L7 = Sequence(Element[L6, i] + Element[L6, i + 1] + Element[L6, i + 2] + Element[L6, i + 3] + Element[L6, i + 4] + Element[L6, i + 5] + Element[L6, i + 6] + Element[L6, i + 7] + Element[L6, i + 8] + Element[L6, i + 9], i, 1, Length[L6], 10)
L8 = Sequence(If[i ≤ Length[L7], Element[L7, i], 0 * Element[L7, 1]], i, 1, 10 * ceil(Length[L7] / 10))
L9 = Sequence(Element[L8, i] + Element[L8, i + 1] + Element[L8, i + 2] + Element[L8, i + 3] + Element[L8, i + 4] + Element[L8, i + 5] + Element[L8, i + 6] + Element[L8, i + 7] + Element[L8, i + 8] + Element[L8, i + 9], i, 1, Length[L8], 10)
a = Element(L9, 1)

Tool: contar
Input: b, L1
Output: a

L1: {7, 5, 7, 8, 2, 7, 5, 5, 5, 8, 3, 10, 8, 12, 11, 8, 6, 6, 4, 6, 6, 9, 6, 9, 7, 8, 4, 8, 11, 9, 2, 7, 9, 7, 3, 6, 9, 2, 7, 7, 7, 7, 5, 8, 4, 5, 12, 4, 3, 2, 10, 10, 7, 7, 9, 12, 4, 5, 7, 6, 5, 7, 8, 12, 7, 8, 7, 3, 7, 6, 8, 9, 5, 6, 5, 3, 6, 7, 7, 10, 10, 9, 7, 8, 10, 7, 4, 4, 10, 3, 4, 9, 8, 7, 6, 7, 4, 9, 4, 10, 3, 6, 8, 6, 8, 9, 9, 8, 7, 9, 3, 11, 7, 7, 5, 11, 3, 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 5, 9, 9, 6, 9, 7, 9, 12, 8, 6, 5, 3, 3, 4, 2, 6, 8, 4, 6, 10, 3, 11, 8, 5, 6, 2, 3, 3, 6, 8, 3, 3, 6, 6, 6, 4, 7, 5, 6, 2, 5, 7, 7, 7, 10, 8, 7, 3, 5, 7, 11, 5, 6, 10, 7, 6, 10, 11, 8, 7, 10, 6, 5, 4, 8, 11, 5, 5, 10, 5, 3, 10, 9, 6, 8, 5, 4, 3, 8, 8, 10, 6, 5, 9, 8, 7, 10, 7, 7, 9, 8, 9, 7, 3, 8, 6, 6, 10, 7, 8, 5, 10, 8, 10, 8, 7, 5, 3, 8, 4, 6, 2, 3, 7, 5, 8, 3, 10, 5, 7, 4, 7, 6, 11, 6, 8, 10, 8, 6, 8, 7, 6, 11, 3, 10, 6, 7, 8, 10, 9, 2, 7, 8, 7, 6, 5, 9, 5, 5, 10, 7, 10, 7, 4, 9, 9, 2, 7, 12, 7, 8, 6, 6, 10, 7, 8, 8, 11, 5, 6, 10, 9, 7, 10, 11, 6, 11, 8, 12, 5, 6, 9, 6, 6, 10, 3, 8, 10, 6, 4, 4, 9, 10, 2, 3, 9, 8, 8, 8, 6}
M1 = Sequence(If[b ≟ Element[L1, i], 1, 0], i, 1, Length[L1])
M2 = Sequence(If[i ≤ Length[M1], Element[M1, i], 0], i, 1, 10 * ceil(Length[M1] / 10))
L3 = Sequence(Element[M2, i] + Element[M2, i + 1] + Element[M2, i + 2] + Element[M2, i + 3] + Element[M2, i + 4] + Element[M2, i + 5] + Element[M2, i + 6] + Element[M2, i + 7] + Element[M2, i + 8] + Element[M2, i + 9], i, 1, Length[M2], 10)
L4 = Sequence(If[i ≤ Length[L3], Element[L3, i], 0], i, 1, 10 * ceil(Length[L3] / 10))
L5 = Sequence(Element[L4, i] + Element[L4, i + 1] + Element[L4, i + 2] + Element[L4, i + 3] + Element[L4, i + 4] + Element[L4, i + 5] + Element[L4, i + 6] + Element[L4, i + 7] + Element[L4, i + 8] + Element[L4, i + 9], i, 1, Length[L4], 10)
L6 = Sequence(If[i ≤ Length[L5], Element[L5, i], 0], i, 1, 10 * ceil(Length[L5] / 10))
L7 = Sequence(Element[L6, i] + Element[L6, i + 1] + Element[L6, i + 2] + Element[L6, i + 3] + Element[L6, i + 4] + Element[L6, i + 5] + Element[L6, i + 6] + Element[L6, i + 7] + Element[L6, i + 8] + Element[L6, i + 9], i, 1, Length[L6], 10)
L8 = Sequence(If[i ≤ Length[L7], Element[L7, i], 0], i, 1, 10 * ceil(Length[L7] / 10))
L9 = Sequence(Element[L8, i] + Element[L8, i + 1] + Element[L8, i + 2] + Element[L8, i + 3] + Element[L8, i + 4] + Element[L8, i + 5] + Element[L8, i + 6] + Element[L8, i + 7] + Element[L8, i + 8] + Element[L8, i + 9], i, 1, Length[L8], 10)
a = Element(L9, 1)

Tool: aplica
aplica función a lista
Input: f, L1
Output: list1

L1: {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}
f(x) = (x - 6.97)^(2)
list1 = Sequence(f(Element[L1, i]), i, 1, Length[L1])

Tool: Lproducto
multiplica los elementos de dos listas;trunca al minimo nº de elementos
Input: L1, L2
Output: list2

L1: {24.740676, 15.792676000000002, 8.844676000000002, 3.8966760000000007, 0.9486760000000004, 6.759999999999897E-4, 1.0526759999999995, 4.1046759999999995, 9.156676, 16.208675999999997, 25.260675999999997}
L2: {0.027, 0.065, 0.086, 0.1, 0.147, 0.154, 0.144, 0.105, 0.092, 0.056, 0.024}
list2 = Sequence(Element[L1, i] * Element[L2, i], i, 1, Min[Length[L1], Length[L2]])

Tool: Lsuma
suma los elementos de dos listas; trunca al menor nº de elementos
Input: L1, L2
Output: list1

L1: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
L2: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
list1 = Sequence(Element[L1, i] + Element[L2, i], i, 1, Min[Length[L1], Length[L2]])

Tool: suma (command suma1)
suma listas de numeros
Input: L1
Output: a

L1: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
L2 = Sequence(If[i ≤ Length[L1], Element[L1, i], 0 * Element[L1, 1]], i, 1, 10 * ceil(Length[L1] / 10))
L3 = Sequence(Element[L2, i] + Element[L2, i + 1] + Element[L2, i + 2] + Element[L2, i + 3] + Element[L2, i + 4] + Element[L2, i + 5] + Element[L2, i + 6] + Element[L2, i + 7] + Element[L2, i + 8] + Element[L2, i + 9], i, 1, Length[L2], 10)
L4 = Sequence(If[i ≤ Length[L3], Element[L3, i], 0 * Element[L3, 1]], i, 1, 10 * ceil(Length[L3] / 10))
L5 = Sequence(Element[L4, i] + Element[L4, i + 1] + Element[L4, i + 2] + Element[L4, i + 3] + Element[L4, i + 4] + Element[L4, i + 5] + Element[L4, i + 6] + Element[L4, i + 7] + Element[L4, i + 8] + Element[L4, i + 9], i, 1, Length[L4], 10)
L6 = Sequence(If[i ≤ Length[L5], Element[L5, i], 0 * Element[L5, 1]], i, 1, 10 * ceil(Length[L5] / 10))
L7 = Sequence(Element[L6, i] + Element[L6, i + 1] + Element[L6, i + 2] + Element[L6, i + 3] + Element[L6, i + 4] + Element[L6, i + 5] + Element[L6, i + 6] + Element[L6, i + 7] + Element[L6, i + 8] + Element[L6, i + 9], i, 1, Length[L6], 10)
L8 = Sequence(If[i ≤ Length[L7], Element[L7, i], 0 * Element[L7, 1]], i, 1, 10 * ceil(Length[L7] / 10))
L9 = Sequence(Element[L8, i] + Element[L8, i + 1] + Element[L8, i + 2] + Element[L8, i + 3] + Element[L8, i + 4] + Element[L8, i + 5] + Element[L8, i + 6] + Element[L8, i + 7] + Element[L8, i + 8] + Element[L8, i + 9], i, 1, Length[L8], 10)
a = Element(L9, 1)

Tool: sumaparte
suma hasta el elemento indicado
Input: L1, a
Output: b

L1: {0.027, 0.065, 0.086, 0.1, 0.147, 0.154, 0.144, 0.105, 0.092, 0.056, 0.024}
list1 = Sequence(Element[L1, i], i, 1, a)
b = suma(list1)

Tool: acumula
va acumulando las cantidades de una lista
Input: L1
Output: list1

L1: {0.027, 0.065, 0.086, 0.1, 0.147, 0.154, 0.144, 0.105, 0.092, 0.056, 0.024}
list1 = Sequence(sumaparte[L1, i], i, 1, Length[L1])

Tool: buscamayoroigual
posicion del primer elemento mayor o igual que el nº dado en lista
Input: a, L1
Output: b

L1: {0.027, 0.092, 0.178, 0.278, 0.42500000000000004, 0.5790000000000001, 0.7230000000000001, 0.8280000000000001, 0.92, 0.9760000000000001, 1}
L2 = Sequence(If[Element[L1, i] ≥ a, i, Length[L1] + 2], i, 1, Length[L1])
b = If(Min[L2] ≤ Length[L1], Min[L2], 0)

Tool: histo
X,f,radio,escalar
Input: X_i, f_i, h, escala
Output: list1

X_i: {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}
f_i: {0.027, 0.065, 0.086, 0.1, 0.147, 0.154, 0.144, 0.105, 0.092, 0.056, 0.024}
list1 = Sequence(Polygon[(Element[X_i, k] - h, 0), (Element[X_i, k] - h, 100 * escala * Element[f_i, k]), (Element[X_i, k] + h, 100 * escala * Element[f_i, k]), (Element[X_i, k] + h, 0)], k, 1, Length[X_i])