samples

iffunction

$\bar{x}: $

Input sample

Generate

Around Population Mean

Around Sample Mean

$Show\;interval\;around\; \mu$

$Show\; interval\; around\; \bar{x}$

Sample size:

95

Clear except interval

C.I.

%

Generate 1 sample

Reset

%

s :

use σ

zv = 1.96
PData: {0.1, 0.1, 0.5, 0.5, 0.5, 0.6, 0.8, 1, 1, 1, 1, 1, 1, 1.1, 1.1, 1.2, 1.3, 1.5, 1.5, 1.5, 1.6, 1.7, 1.9, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2.5, 2.5, 2.5, 2.5, 2.6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3.5, 3.5, 3.5, 3.5, 3.5, 3.9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4.1, 4.1, 4.5, 4.6, 4.7, 4.8, 4.9, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5.1, 5.1, 5.2, 5.3, 5.4, 5.5, 5.5, 5.5, 5.6, 5.6, 5.7, 5.8, 5.9, 5.9, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6.1, 6.2, 6.2, 6.5, 6.5, 6.5, 6.5, 6.6, 6.6, 6.7, 6.7, 6.8, 6.8, 6.8, 6.9, 7, 7, 7, 7, 7, 7, 7, 7, 7.1, 7.4, 7.5, 7.8, 7.8, 7.9, 7.9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8.1, 8.4, 8.5, 8.8, 8.9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9.1, 9.3, 9.4, 9.5, 9.5, 9.5, 9.7, 9.7, 9.9, 9.9, 9.9, 9.9, 9.9}
mu = Mean(PData)
sigma: sqrt(Variance[PData])
n = 100
sigmaxbar: sigma / sqrt(n)
counter = 1
lb: mu - (zv * sigmaxbar)
ub: mu + (zv * sigmaxbar)
poly1, a, b, c, d = Polygon((lb, 0), (ub, 0), (ub, counter + (0.1 * counter)), (lb, counter + (0.1 * counter)))
samplemeans: {}
nsamples = 50
InputBox1 = Textfield(nsamples)
muline = Segment((mu, 0), (mu, counter + (0.1 * counter)))
xsm: {2, 2}
counter1 = 0
xbar = 5.257000000000001
smpoints: {}
smpoints1: {}
prop95: ((counter - 1 - counter1) / (counter - 1) * 100)
text2: "Total No. of samples: " + (counter - 1) + ""
myxbar = 3.5
InputBox2 = Textfield(myxbar)
text6: "Generate " + nsamples + " samples"
xv: {}
xv1: {}
e = false
f = false
list1: {}
InputBox3 = Textfield(n)
text5: "μ=" + mu
h = Length(text5)
cil = 95
InputBox4 = Textfield(cil)
text1: "\begin{array}{}  " + (LaTeX[prop95]) + "  %\;of\;my\;sample\; means\;\\are\;captured\;by\;the\;" + (LaTeX[itext]) + "\% \;C.I.\end{array}"
sds: {0.25652680171865117, 0.27, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.2, 0.27, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653, 0.25653}
mysdev = 0.2
sdev = 0.2
InputBox5 = Textfield(mysdev)
sds1: {0.02, 0.02}
EBars1 = Sequence(Segment[(x(Element[smpoints1, i]) - (zv * Element[sds1, i]), y(Element[smpoints1, i])), (x(Element[smpoints1, i]) + (zv * Element[sds1, i]), y(Element[smpoints1, i]))], i, 1, Length[smpoints1])
text7: "\begin{array}{}" + (LaTeX[prop95]) + "%\;of\;my\;" + (LaTeX[itext]) + "\%\;confidence\;intervals\;\\capture\;the\; population\;mean\end{array}"
g = true
sdsigma: {0.25652680171865117, 0.25652680171865117, 0.25652680171865117, 0.25652680171865117, 0.25652680171865117}
EBars = If(g, Sequence[Segment[(Element[samplemeans, i] - (zv * Element[sdsigma, i]), Element[xv, i]), (Element[samplemeans, i] + (zv * Element[sdsigma, i]), Element[xv, i])], i, 1, counter], Sequence[Segment[(Element[samplemeans, i] - (zv * Element[sds, i]), Element[xv, i]), (Element[samplemeans, i] + (zv * Element[sds, i]), Element[xv, i])], i, 1, counter])
disc: abs((xbar - mu) / (sigma / sqrt(n)))
i = Element(samplemeans, 2)
dummyDisc = 6.315129604963277