library(shiny)

shinyUI(bootstrapPage(
    includeHTML("navbar.html"),
    headerPanel("Convergence of the MLE"),
    sidebarPanel(
        sliderInput("n","Sample size n",min=1,max=100,value=10),
        sliderInput("p","Success probability p",min=0,max=1,value=0.5,step=0.01),
        radioButtons("dist", "Show CDF of:",
                     list("\\(\\hat p_n\\)" = "MLE","\\(\\sqrt{n}(\\hat p_n-p)\\)"="stdMLE")),
        helpText("Setup:","\\(X_1,\\dots,X_n\\sim \\)Bernoulli(p) independently.","\\(\\hat p_n=\\frac{1}{n}\\sum_{i=1}^n X_i\\) is the MLE for p.")
        ),
    mainPanel(plotOutput("cdf",height="auto")),
    includeHTML("mycode.html")
    )
        )