Published unlisted
Edited
Sep 3, 2020
Insert cell
Insert cell
Insert cell
the_problem = {
if (name == "") {
return md``;
} else {
return md`---
Suppose that ${tex`X`} is a normally distributed random variable with mean ${tex.block`\mu=${f(
p.m
)} \: \text{ and } \: \sigma = ${f(p.s)}.`}
1. Compute the ${tex`Z`}-score for ${tex`X=${f(
p.m + p.s
)}`}. Then, use the rules of thumb to tell us ${tex.block`P(X<${f(
p.m + p.s
)}).`}
2. Use a ${tex`Z`}-score and a normal table to compute each of the following:
* a: ${tex`P(X<${f(p.x1)})`}
* b: ${tex`P(X>${f(p.x1)})`}
* c: ${tex`P(${f(p.x2)}<X<${f(p.x1)})`}
3. Now, fire up [this Colab notebook](https://colab.research.google.com/drive/1s1OXSsXmtTGghfCi1uhqe2-_W1y5MyDr?usp=sharing) and use it to:
* a: Draw a picture of your normal distribution together with a verticaal line indicating the location of ${tex`X=${f(
p.x1
)}`}
* b: Use the \`norm.cdf\` command to compute ${tex`P(X<${f(
p.x1
)})`}. Note that this is the same computation you did in 2a. How do your answers compare?
`;
}
}
Insert cell
p = {
if (name == "") {
return { m: 0, s: 0, x1: 0, x2: 0 };
} else {
let v = d3.sum(d3.range(name.length).map((c, i) => name.charCodeAt(i)));
let seed = v / (10 ** Math.ceil(Math.log10(v)) + 2);
let source = d3.randomLcg(seed);
let m = d3.randomUniform.source(source)(40, 100)();
let s = d3.randomUniform.source(source)(5, 20)();
let x1 = d3.randomUniform.source(source)(m - s, m + 2 * s)();
let x2 = d3.randomUniform.source(source)(m - 2.5 * s, x1)();
let parameters = { m: m, s: s, x1: x1, x2: x2 };
return parameters;
}
}
Insert cell
f = d3.format('0.2f')
Insert cell
import { text } from "@jashkenas/inputs"
Insert cell
d3 = require('d3@6')
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more