|
|
(٥ مراجعات متوسطة بواسطة نفس المستخدم غير معروضة) |
سطر ١١١: |
سطر ١١١: |
|
| |
|
|
| |
|
| <pre>
| |
| <Rform name="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;"> | | <iframe height="700" k="wiwi" P="mmstat_en/distribution_binom/" /> |
| if (exists("prob")) prob <- as.numeric(prob) else prob <- 0.2
| |
| n <- 10
| |
| 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>
| |
| </pre>
| |
| | |
| <Rform name="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.2
| |
| if (exists("n")) n <- as.numeric(n) else n <- 10
| |
| 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>
| |
| | |
| | |
| <pre>
| |
| <R output="html" iframe="width:100%;height:250px;">
| |
| prob=0.15; nmin=1; nmax=15; x=6
| |
| 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="x\n", format="f", digits=4)
| |
| </R>
| |
| </pre>
| |
| | |
| <R output="html" iframe="width:100%;height:250px;">
| |
| prob=0.15; nmin=1; nmax=15; x=6
| |
| 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="x\n", format="f", digits=4)
| |
| </R>
| |
| | |
| | |
| <Rform name="cdfpoisson">
| |
| Lambda: <input name="lambda" type="text" size="5" maxlength="5" value="1"><input type="submit" value=" Absenden ">
| |
| </Rform>
| |
| <R output="html" name="cdfpoisson" iframe="height:400px;width:15%;" >
| |
| if (exists("lambda")) lambda<-as.numeric(lambda) else lambda<-1
| |
| nmin<-0; nmax<-50
| |
| m <-ppois(nmin:nmax, lambda)
| |
| dim(m) <- c(nmax-nmin+1,1)
| |
| colnames(m) <- 'F(x)'
| |
| rownames(m) <- format(nmin:nmax)
| |
| txt = paste("lambda=", lambda, "<br>x")
| |
| outHTML(rhtml, m, title=txt, format="f", digits=4)
| |
| </R>
| |
| <Rform name="wkPo">
| |
| Lambda: <input name="lambda" type="text" size="5" maxlength="5" value="1"> <input type="submit" value=" Submit ">
| |
| </Rform>
| |
| <R output="display" name="wkPo" iframe="height:400px;">
| |
| if (exists("lambda")) lambda <- as.numeric(lambda) else lambda <- 1
| |
| x <- seq(0, 25, 1)
| |
| p <- dpois(x, lambda)
| |
| main <- c("Poissonverteilung - Wahrscheinlichkeitsfunktion", paste ("Lambda", lambda, sep="="))
| |
| pdf(rpdf, width=5, height=5)
| |
| plot(x,p, type="h", main=main)
| |
| </R>
| |
| | |
| | |
| <Rform name="cdfhyper">
| |
| n: <input name="n" type="text" size="5" maxlength="5" value="6"> N: <input name="N" type="text" size="5" maxlength="5" value="49"> M: <input name="M" type="text" size="5" maxlength="5" value="6"> <input type="submit" value="Absenden">
| |
| </Rform>
| |
| <R output="html" name="cdfhyper" iframe="width:200px,height:200px;">
| |
| if (exists("M")) M <- as.numeric(M) else M <- 6
| |
| if (exists("N")) N <- as.numeric(N) else N <- 49
| |
| if (exists("n")) n <- as.numeric(n) else n <- 6
| |
| xmin=max(0,M+n-N); xmax=min(n,M)
| |
| dis <- phyper(rep(xmin:xmax,1), M, N-M, n)
| |
| prob <- dhyper(rep(xmin:xmax,1), M, N-M, n)
| |
| m <- cbind(dis,prob)
| |
| dim(m) <- c(xmax-xmin+1,2)
| |
| colnames(m) <- c("F(x)", "P(X=i)")
| |
| rownames(m) <- format(xmin:xmax)
| |
| outHTML(rhtml, m, title="i", format="f", digits=4)
| |
| </R>
| |
| | |
| <Rform name="wkH">
| |
| n: <input name="n" type="text" size="5" maxlength="5" value="6"> N: <input name="N" type="text" size="5" maxlength="5" value="49"> M: <input name="M" type="text" size="5" maxlength="5" value="6"> <input type="submit" value=" Submit ">
| |
| </Rform>
| |
| <R output="display" name="wkH" iframe="height:400px;">
| |
| if (exists("M")) M <- as.numeric(M) else M <- 6
| |
| if (exists("N")) N <- as.numeric(N) else N <- 49
| |
| if (exists("n")) n <- as.numeric(n) else n <- 6
| |
| x <- seq(0, n, 1)
| |
| p <- dhyper(x, M, N-M, n)
| |
| param <- list(n, N, M)
| |
| main <- c("Hypergeometrische Verteilung-Wahrscheinlichkeitsfunkt.", paste (c("n", "N", "M"), param, sep="="))
| |
| pdf(rpdf, width=5.5, height=5.5)
| |
| plot(x,p, type="h", main=main)
| |
| </R>
| |