|
|
(٧ مراجعات متوسطة بواسطة نفس المستخدم غير معروضة) |
سطر ٨: |
سطر ٨: |
|
| |
|
|
| |
|
| <Rform name="binom"> | | <iframe height="700" k="wiwi" P="mmstat_en/distribution_binom" /> |
| n: <input name="n" type="text" size="5" maxlength="5" value="10"> prob: <input name="prob" type="text" size="5" maxlength="5" value="0.2"> <input type="submit" value=" Submit "> (You may need to reload the iframe below after submitting).
| |
| </Rform>
| |
| <R output="display" name="binom" convert="-trim" iframe="height:400px;">
| |
| if (exists("prob")) prob <- as.numeric(prob) else prob <- 0.6
| |
| if (exists("n")) n <- as.numeric(n) else n <- 30
| |
| x<- seq(0, n, 1)
| |
| p <- dbinom(x, n, prob)
| |
| param <- list(n, prob)
| |
| main <- c("Binomialverteilung - Dichtefunktion", paste (c("Stichprobenumfang n", "Wahrscheinlichkeit p"), param, sep="="))
| |
| pdf(rpdf, width=5, height=5)
| |
| plot(x,p, type="h", main=main)
| |
| </R>
| |
| | |
| | |
| <Rform name="cdfbinom">
| |
| p: <input name="prob" type="text" size="5" maxlength="5" value="0.5"><input type="submit" value=" Absenden ">
| |
| </Rform>
| |
| <R output="html" name="cdfbinom" iframe="height:600px;">
| |
| if (exists("prob")) prob<-as.numeric(prob) else prob<-0.5
| |
| nmin=1; nmax=15; x=15
| |
| m <-pbinom(rep(0:x, each = nmax-nmin+1), nmin:nmax, prob)
| |
| dim(m) <- c(nmax-nmin+1,x+1)
| |
| m <- t(m)
| |
| colnames(m) <- format(nmin:nmax)
| |
| rownames(m) <- format(0:x)
| |
| txt = paste("p=", prob, "<br>x\n")
| |
| outHTML(rhtml, m, title=txt, format="f", digits=4)
| |
| nmin=16; nmax=30; x=30
| |
| m <-pbinom(rep(0:x, each = nmax-nmin+1), rep(nmin:nmax,x), prob)
| |
| dim(m) <- c(nmax-nmin+1,x+1)
| |
| m <- t(m)
| |
| colnames(m) <- format(nmin:nmax)
| |
| rownames(m) <- format(0:x)
| |
| outHTML(rhtml, m, title=txt, format="f", digits=4)
| |
| </R>
| |