|
|
سطر ١٣: |
سطر ١٣: |
| '''Direct output''' | | '''Direct output''' |
|
| |
|
| <pre><R>1:25</R></pre> | | <pre><iframe k="wiwi" P="examples/?P=mmara/01.R" /></pre> |
|
| |
|
| <R>1:25</R> | | <iframe k="wiwi" P="examples/?P=mmara/01.R" /> |
|
| |
|
| '''Iframe output''' | | '''Iframe output''' |
|
| |
|
| <pre><R iframe="width:100%;height:40px">1:25</R></pre> | | <pre><iframe k="wiwi" P="examples/?P=mmara/03.R" /></pre> |
|
| |
|
| <R iframe="width:100%;height:40px">1:25 </R> | | <iframe k="wiwi" P="examples/?P=mmara/04.R" /> |
|
| |
|
|
| |
|
سطر ٦٧: |
سطر ٦٧: |
|
| |
|
|
| |
|
| <Rform name="cdfhyper"> | | <iframe k="wiwi" P="examples/?P=mmara/05.R" />form> |
| 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">
| | <iframe k="wiwi" P="examples/?P=mmara/06.R" /> |
| </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=8)
| |
| </R>
| |
|
| |
|
|
| |
|
| <Rform name="normal"> | | <iframe k="wiwi" P="examples/?P=mmara/07.R" />form> |
| M: <input name="M" type="text" size="5" maxlength="5" value="10">
| |
| Variance: <input name="Variance" type="text" size="5" maxlength="5" value="2">
| |
| <input type="submit" value=" Submit "> (You may need to reload the iframe below after submitting).
| |
| </Rform>
| |
|
| |
|
| <R output="display" name="normal" iframe="height:400px;"> | | <iframe k="wiwi" P="examples/?P=mmara/08.R" /> |
| if (exists("Variance")) prob <- as.numeric(Variance) else Variance <- 2
| |
| if (exists("M")) M <- as.numeric(M) else M <- 10
| |
| x <- seq(0, M, 1)
| |
| Variance <- dVariance(x, M, Variance)
| |
| param <- list(M, Variance)
| |
| main <- c("Normalverteilung - Wahrscheinlichkeitsfunktion", paste (c("Stichprobenumfang M", "Wahrscheinlichkeit p"), param, sep="="))
| |
| pdf(rpdf, horizontal=FALSE, width=5, height=5)
| |
| plot(x,p, type="h", main=main)
| |
| </R>
| |
كما في التوزيع الثنائي , يبنى التوزيع الهندسي على التجربة مع نتيجتين ممكنتين فقط .
يختلف التوزيع الهندسي عن التوزيع الثنائي بأننا نسحب دون اعادة, يعني ذلك لا تكون السحوبات من
التوزيع الهندسي مستقلة
Direct output
<iframe k="wiwi" P="examples/?P=mmara/01.R" />
Iframe output
<iframe k="wiwi" P="examples/?P=mmara/03.R" />
يملك المتغير العشوائي X الذي يحتوي عدد النجاحات A بعد n تكرار للتجربة التوزيع الهندسي مع العناصر M,N و n مع تابع الكثافة الاحتمالي
الترميز البسيط له
form>
form>