         data.push({x:x[j], y:dt(x[j], df)})
 
     figs[2].append("path")
+           .attr("class", "curves")
            .datum(data)
            .attr("d", curve(2))
            .attr("fill", "none")
            .attr("stroke", "black")
            .attr("stroke-width", 2)
 
+    critval = qt(1-alpha/2, df)
+
+    if critval < 8
+        scale4x = d3.scale.linear().domain([0,1]).range([critval, 8])
+        x = d3.range(npts).map (i) -> scale4x(i/npts)
+        data = []
+        for j of x
+            data.push({x:x[j], y:dt(x[j], df)})
+        data.push({x:critval, y:0})
+
+        figs[2].append("path")
+               .attr("class", "curves")
+               .datum(data)
+               .attr("d", curve(2))
+               .attr("fill", "slateblue")
+               .attr("stroke", "none")
+               .attr("opacity", 0.5)
+        figs[2].append("line")
+               .attr("class", "curves")
+               .attr("x1", xscale[2](critval))
+               .attr("y1", figheight+margin.top)
+               .attr("x2", xscale[2](critval))
+               .attr("y2", figheight+margin.top+margin.bottom*0.2)
+               .attr("stroke", "black")
+        figs[2].append("text")
+               .attr("class", "curves")
+               .attr("x", xscale[2](critval))
+               .attr("y", margin.top + figheight + margin.bottom/2)
+               .text("T")
+               .attr("dominant-baseline", "middle")
+               .attr("text-anchor", "middle")
+
+
 update_plots()
 
 # test statistic, null and alternative

            data.push({x:x[j], y:dnorm(x[j], mu[i], sem)})

        figs[1].append("path")
               .datum(data)
               .attr("d", curve(1))
               .attr("fill", "none")

            data.push({x:x[j], y:dnorm(x[j], mu[i], sigma)})

        figs[0].append("path")
               .attr("class", "curves")
               .datum(data)
               .attr("d", curve(0))
               .attr("fill", "none")
