Mensaje de error

  • Deprecated function: The each() function is deprecated. This message will be suppressed on further calls en menu_set_active_trail() (línea 2394 de /home1/montes/public_html/drupal/includes/menu.inc).
  • Deprecated function: The each() function is deprecated. This message will be suppressed on further calls en book_prev() (línea 775 de /home1/montes/public_html/drupal/modules/book/book.module).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters en drupal_get_feeds() (línea 394 de /home1/montes/public_html/drupal/includes/common.inc).

6. Simulacion estadistica del Ejercicio 2.12(Probabilidad bolas en urna con tirada de dados)

Solapas principales

[adsense:336x280:9156825571]

Tendremos que utilizar el package prob del R-Project

Simulacion:

> library(prob)

> S <- rolldie(2,makespace=TRUE)

> A<-S

> colnames(A)<- c("BolasBlancas","BolasNegras")
> A
   BolasBlancas BolasNegras         NA
1             1           1 0.02777778
2             2           1 0.02777778
3             3           1 0.02777778

4             4           1 0.02777778
5             5           1 0.02777778
6             6           1 0.02777778
7             1           2 0.02777778
8             2           2 0.02777778
9             3           2 0.02777778
10            4           2 0.02777778
11            5           2 0.02777778
12            6           2 0.02777778
13            1           3 0.02777778
14            2           3 0.02777778
15            3           3 0.02777778
16            4           3 0.02777778
17            5           3 0.02777778
18            6           3 0.02777778
19            1           4 0.02777778
20            2           4 0.02777778
21            3           4 0.02777778
22            4           4 0.02777778
23            5           4 0.02777778
24            6           4 0.02777778
25            1           5 0.02777778
26            2           5 0.02777778
27            3           5 0.02777778
28            4           5 0.02777778
29            5           5 0.02777778
30            6           5 0.02777778
31            1           6 0.02777778
32            2           6 0.02777778
33            3           6 0.02777778
34            4           6 0.02777778
35            5           6 0.02777778
36            6           6 0.02777778

> #Probabilidad de sacar 3 bolas blancas si hay 8 bolas

> prob(S,X1==3,X1+X2==8)
[1] 0.2
Español
Pin It