Published
Edited
Apr 2, 2020
1 fork
Insert cell
md`# T-test TTI`
Insert cell
pvalue = jStat.ttest(0, 10000000, sdDiffSample, diffSampleSize, 2).toFixed(80)
Insert cell
jStat.mean(oldRouterTTISeries)
Insert cell
jStat.mean(newRouterTTISeries)
Insert cell
sdDiffSample = jStat.stdev(newRouterTTISeries) ** 2 /
newRouterTTISeries.length +
jStat.stdev(oldRouterTTISeries) ** 2 / oldRouterTTISeries.length
Insert cell
diffSampleSize = newRouterTTISeries.length + oldRouterTTISeries.length
Insert cell
newRouterTTISeries = parseTTI(newRouterStats)
Insert cell
oldRouterTTISeries = parseTTI(oldRouterStats)
Insert cell
function parseTTI(stat) {
return stat.runs
.map(stat => stat.timings.find(({ id }) => id === 'interactive'))
.map(({ timing }) => timing);
}
Insert cell
newRouterStats = d3.json(
'https://gist.githubusercontent.com/hexode/ae6d828f4f30fbc785081244f8464e88/raw/a1b40d8ac685fd84a77aed9e2787e7b675167096/new-router.json'
)
Insert cell
oldRouterStats = d3.json(
'https://gist.githubusercontent.com/hexode/99dcd64e9cb527deeec8c211e2a4a8b3/raw/6f64f4e1794ca072d879a17872c3f4c0ce7fd23c/old-router.json'
)
Insert cell
jStat = require('jstat')
Insert cell
d3 = require("d3@5")
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