{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Statistical Inference" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "$\\alpha = \\pi^2$" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Warning message:\n", "“package ‘dplyr’ was built under R version 3.4.1”" ] } ], "source": [ "suppressPackageStartupMessages(library(tidyverse))\n", "suppressPackageStartupMessages(library(pwr))" ] }, { "cell_type": "code", "execution_count": 122, "metadata": { "collapsed": true }, "outputs": [], "source": [ "options(repr.plot.width=4, repr.plot.height=3)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Coin toss experiment" ] }, { "cell_type": "code", "execution_count": 106, "metadata": { "collapsed": true }, "outputs": [], "source": [ "n <- 12\n", "outcomes <- c(\"H\", \"T\")\n", "tosses <- sample(outcomes, n, replace=TRUE)" ] }, { "cell_type": "code", "execution_count": 107, "metadata": {}, "outputs": [ { "data": { "text/html": [ "