iidspace: Independent Identical Experiments

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Sets up a probability space corresponding to independent, identical experiments.

Usage

1
iidspace(x, ntrials, probs = NULL)

Arguments

x

a vector of outcomes.

ntrials

number of times to perform the experiment.

probs

vector of non-negative weights corresponding to x.

Details

The elementary experiment to be repeated consists of drawing an element of x according to the probabilities contained in probs. The entries of probs need not sum to one, but they will be normalized before any computations. If probs is not specified, the equally likely model will be assumed.

Value

A data frame, with a probs column, where probs is calculated to be the probability of observing the outcome in its row under the assumption of independence and identical distribution of draws from x.

Author(s)

G. Jay Kerns gkerns@ysu.edu.

See Also

probspace

Examples

1
2
iidspace( 1:6, ntrials = 3) # same as rolldie(3)
iidspace( 1:6, ntrials = 3, probs = 3:8 ) # unbalanced die

Example output

Loading required package: combinat

Attaching package: 'combinat'

The following object is masked from 'package:utils':

    combn

Loading required package: fAsianOptions
Loading required package: timeDate
Loading required package: timeSeries
Loading required package: fBasics


Rmetrics Package fBasics
Analysing Markets and calculating Basic Statistics
Copyright (C) 2005-2014 Rmetrics Association Zurich
Educational Software for Financial Engineering and Computational Science
Rmetrics is free software and comes with ABSOLUTELY NO WARRANTY.
https://www.rmetrics.org --- Mail to: info@rmetrics.org
Loading required package: fOptions


Rmetrics Package fOptions
Pricing and Evaluating Basic Options
Copyright (C) 2005-2014 Rmetrics Association Zurich
Educational Software for Financial Engineering and Computational Science
Rmetrics is free software and comes with ABSOLUTELY NO WARRANTY.
https://www.rmetrics.org --- Mail to: info@rmetrics.org
Loading required package: hypergeo
Loading required package: VGAM
Loading required package: stats4
Loading required package: splines

Attaching package: 'VGAM'

The following object is masked from 'package:hypergeo':

    is.zero

The following object is masked from 'package:fAsianOptions':

    erf


Attaching package: 'prob'

The following objects are masked from 'package:base':

    intersect, setdiff, union

    X1 X2 X3      probs
1    1  1  1 0.00462963
2    2  1  1 0.00462963
3    3  1  1 0.00462963
4    4  1  1 0.00462963
5    5  1  1 0.00462963
6    6  1  1 0.00462963
7    1  2  1 0.00462963
8    2  2  1 0.00462963
9    3  2  1 0.00462963
10   4  2  1 0.00462963
11   5  2  1 0.00462963
12   6  2  1 0.00462963
13   1  3  1 0.00462963
14   2  3  1 0.00462963
15   3  3  1 0.00462963
16   4  3  1 0.00462963
17   5  3  1 0.00462963
18   6  3  1 0.00462963
19   1  4  1 0.00462963
20   2  4  1 0.00462963
21   3  4  1 0.00462963
22   4  4  1 0.00462963
23   5  4  1 0.00462963
24   6  4  1 0.00462963
25   1  5  1 0.00462963
26   2  5  1 0.00462963
27   3  5  1 0.00462963
28   4  5  1 0.00462963
29   5  5  1 0.00462963
30   6  5  1 0.00462963
31   1  6  1 0.00462963
32   2  6  1 0.00462963
33   3  6  1 0.00462963
34   4  6  1 0.00462963
35   5  6  1 0.00462963
36   6  6  1 0.00462963
37   1  1  2 0.00462963
38   2  1  2 0.00462963
39   3  1  2 0.00462963
40   4  1  2 0.00462963
41   5  1  2 0.00462963
42   6  1  2 0.00462963
43   1  2  2 0.00462963
44   2  2  2 0.00462963
45   3  2  2 0.00462963
46   4  2  2 0.00462963
47   5  2  2 0.00462963
48   6  2  2 0.00462963
49   1  3  2 0.00462963
50   2  3  2 0.00462963
51   3  3  2 0.00462963
52   4  3  2 0.00462963
53   5  3  2 0.00462963
54   6  3  2 0.00462963
55   1  4  2 0.00462963
56   2  4  2 0.00462963
57   3  4  2 0.00462963
58   4  4  2 0.00462963
59   5  4  2 0.00462963
60   6  4  2 0.00462963
61   1  5  2 0.00462963
62   2  5  2 0.00462963
63   3  5  2 0.00462963
64   4  5  2 0.00462963
65   5  5  2 0.00462963
66   6  5  2 0.00462963
67   1  6  2 0.00462963
68   2  6  2 0.00462963
69   3  6  2 0.00462963
70   4  6  2 0.00462963
71   5  6  2 0.00462963
72   6  6  2 0.00462963
73   1  1  3 0.00462963
74   2  1  3 0.00462963
75   3  1  3 0.00462963
76   4  1  3 0.00462963
77   5  1  3 0.00462963
78   6  1  3 0.00462963
79   1  2  3 0.00462963
80   2  2  3 0.00462963
81   3  2  3 0.00462963
82   4  2  3 0.00462963
83   5  2  3 0.00462963
84   6  2  3 0.00462963
85   1  3  3 0.00462963
86   2  3  3 0.00462963
87   3  3  3 0.00462963
88   4  3  3 0.00462963
89   5  3  3 0.00462963
90   6  3  3 0.00462963
91   1  4  3 0.00462963
92   2  4  3 0.00462963
93   3  4  3 0.00462963
94   4  4  3 0.00462963
95   5  4  3 0.00462963
96   6  4  3 0.00462963
97   1  5  3 0.00462963
98   2  5  3 0.00462963
99   3  5  3 0.00462963
100  4  5  3 0.00462963
101  5  5  3 0.00462963
102  6  5  3 0.00462963
103  1  6  3 0.00462963
104  2  6  3 0.00462963
105  3  6  3 0.00462963
106  4  6  3 0.00462963
107  5  6  3 0.00462963
108  6  6  3 0.00462963
109  1  1  4 0.00462963
110  2  1  4 0.00462963
111  3  1  4 0.00462963
112  4  1  4 0.00462963
113  5  1  4 0.00462963
114  6  1  4 0.00462963
115  1  2  4 0.00462963
116  2  2  4 0.00462963
117  3  2  4 0.00462963
118  4  2  4 0.00462963
119  5  2  4 0.00462963
120  6  2  4 0.00462963
121  1  3  4 0.00462963
122  2  3  4 0.00462963
123  3  3  4 0.00462963
124  4  3  4 0.00462963
125  5  3  4 0.00462963
126  6  3  4 0.00462963
127  1  4  4 0.00462963
128  2  4  4 0.00462963
129  3  4  4 0.00462963
130  4  4  4 0.00462963
131  5  4  4 0.00462963
132  6  4  4 0.00462963
133  1  5  4 0.00462963
134  2  5  4 0.00462963
135  3  5  4 0.00462963
136  4  5  4 0.00462963
137  5  5  4 0.00462963
138  6  5  4 0.00462963
139  1  6  4 0.00462963
140  2  6  4 0.00462963
141  3  6  4 0.00462963
142  4  6  4 0.00462963
143  5  6  4 0.00462963
144  6  6  4 0.00462963
145  1  1  5 0.00462963
146  2  1  5 0.00462963
147  3  1  5 0.00462963
148  4  1  5 0.00462963
149  5  1  5 0.00462963
150  6  1  5 0.00462963
151  1  2  5 0.00462963
152  2  2  5 0.00462963
153  3  2  5 0.00462963
154  4  2  5 0.00462963
155  5  2  5 0.00462963
156  6  2  5 0.00462963
157  1  3  5 0.00462963
158  2  3  5 0.00462963
159  3  3  5 0.00462963
160  4  3  5 0.00462963
161  5  3  5 0.00462963
162  6  3  5 0.00462963
163  1  4  5 0.00462963
164  2  4  5 0.00462963
165  3  4  5 0.00462963
166  4  4  5 0.00462963
167  5  4  5 0.00462963
168  6  4  5 0.00462963
169  1  5  5 0.00462963
170  2  5  5 0.00462963
171  3  5  5 0.00462963
172  4  5  5 0.00462963
173  5  5  5 0.00462963
174  6  5  5 0.00462963
175  1  6  5 0.00462963
176  2  6  5 0.00462963
177  3  6  5 0.00462963
178  4  6  5 0.00462963
179  5  6  5 0.00462963
180  6  6  5 0.00462963
181  1  1  6 0.00462963
182  2  1  6 0.00462963
183  3  1  6 0.00462963
184  4  1  6 0.00462963
185  5  1  6 0.00462963
186  6  1  6 0.00462963
187  1  2  6 0.00462963
188  2  2  6 0.00462963
189  3  2  6 0.00462963
190  4  2  6 0.00462963
191  5  2  6 0.00462963
192  6  2  6 0.00462963
193  1  3  6 0.00462963
194  2  3  6 0.00462963
195  3  3  6 0.00462963
196  4  3  6 0.00462963
197  5  3  6 0.00462963
198  6  3  6 0.00462963
199  1  4  6 0.00462963
200  2  4  6 0.00462963
201  3  4  6 0.00462963
202  4  4  6 0.00462963
203  5  4  6 0.00462963
204  6  4  6 0.00462963
205  1  5  6 0.00462963
206  2  5  6 0.00462963
207  3  5  6 0.00462963
208  4  5  6 0.00462963
209  5  5  6 0.00462963
210  6  5  6 0.00462963
211  1  6  6 0.00462963
212  2  6  6 0.00462963
213  3  6  6 0.00462963
214  4  6  6 0.00462963
215  5  6  6 0.00462963
216  6  6  6 0.00462963
    X1 X2 X3        probs
1    1  1  1 0.0007513148
2    2  1  1 0.0010017531
3    3  1  1 0.0012521913
4    4  1  1 0.0015026296
5    5  1  1 0.0017530679
6    6  1  1 0.0020035061
7    1  2  1 0.0010017531
8    2  2  1 0.0013356708
9    3  2  1 0.0016695884
10   4  2  1 0.0020035061
11   5  2  1 0.0023374238
12   6  2  1 0.0026713415
13   1  3  1 0.0012521913
14   2  3  1 0.0016695884
15   3  3  1 0.0020869856
16   4  3  1 0.0025043827
17   5  3  1 0.0029217798
18   6  3  1 0.0033391769
19   1  4  1 0.0015026296
20   2  4  1 0.0020035061
21   3  4  1 0.0025043827
22   4  4  1 0.0030052592
23   5  4  1 0.0035061357
24   6  4  1 0.0040070123
25   1  5  1 0.0017530679
26   2  5  1 0.0023374238
27   3  5  1 0.0029217798
28   4  5  1 0.0035061357
29   5  5  1 0.0040904917
30   6  5  1 0.0046748477
31   1  6  1 0.0020035061
32   2  6  1 0.0026713415
33   3  6  1 0.0033391769
34   4  6  1 0.0040070123
35   5  6  1 0.0046748477
36   6  6  1 0.0053426830
37   1  1  2 0.0010017531
38   2  1  2 0.0013356708
39   3  1  2 0.0016695884
40   4  1  2 0.0020035061
41   5  1  2 0.0023374238
42   6  1  2 0.0026713415
43   1  2  2 0.0013356708
44   2  2  2 0.0017808943
45   3  2  2 0.0022261179
46   4  2  2 0.0026713415
47   5  2  2 0.0031165651
48   6  2  2 0.0035617887
49   1  3  2 0.0016695884
50   2  3  2 0.0022261179
51   3  3  2 0.0027826474
52   4  3  2 0.0033391769
53   5  3  2 0.0038957064
54   6  3  2 0.0044522359
55   1  4  2 0.0020035061
56   2  4  2 0.0026713415
57   3  4  2 0.0033391769
58   4  4  2 0.0040070123
59   5  4  2 0.0046748477
60   6  4  2 0.0053426830
61   1  5  2 0.0023374238
62   2  5  2 0.0031165651
63   3  5  2 0.0038957064
64   4  5  2 0.0046748477
65   5  5  2 0.0054539889
66   6  5  2 0.0062331302
67   1  6  2 0.0026713415
68   2  6  2 0.0035617887
69   3  6  2 0.0044522359
70   4  6  2 0.0053426830
71   5  6  2 0.0062331302
72   6  6  2 0.0071235774
73   1  1  3 0.0012521913
74   2  1  3 0.0016695884
75   3  1  3 0.0020869856
76   4  1  3 0.0025043827
77   5  1  3 0.0029217798
78   6  1  3 0.0033391769
79   1  2  3 0.0016695884
80   2  2  3 0.0022261179
81   3  2  3 0.0027826474
82   4  2  3 0.0033391769
83   5  2  3 0.0038957064
84   6  2  3 0.0044522359
85   1  3  3 0.0020869856
86   2  3  3 0.0027826474
87   3  3  3 0.0034783093
88   4  3  3 0.0041739711
89   5  3  3 0.0048696330
90   6  3  3 0.0055652948
91   1  4  3 0.0025043827
92   2  4  3 0.0033391769
93   3  4  3 0.0041739711
94   4  4  3 0.0050087653
95   5  4  3 0.0058435596
96   6  4  3 0.0066783538
97   1  5  3 0.0029217798
98   2  5  3 0.0038957064
99   3  5  3 0.0048696330
100  4  5  3 0.0058435596
101  5  5  3 0.0068174862
102  6  5  3 0.0077914128
103  1  6  3 0.0033391769
104  2  6  3 0.0044522359
105  3  6  3 0.0055652948
106  4  6  3 0.0066783538
107  5  6  3 0.0077914128
108  6  6  3 0.0089044717
109  1  1  4 0.0015026296
110  2  1  4 0.0020035061
111  3  1  4 0.0025043827
112  4  1  4 0.0030052592
113  5  1  4 0.0035061357
114  6  1  4 0.0040070123
115  1  2  4 0.0020035061
116  2  2  4 0.0026713415
117  3  2  4 0.0033391769
118  4  2  4 0.0040070123
119  5  2  4 0.0046748477
120  6  2  4 0.0053426830
121  1  3  4 0.0025043827
122  2  3  4 0.0033391769
123  3  3  4 0.0041739711
124  4  3  4 0.0050087653
125  5  3  4 0.0058435596
126  6  3  4 0.0066783538
127  1  4  4 0.0030052592
128  2  4  4 0.0040070123
129  3  4  4 0.0050087653
130  4  4  4 0.0060105184
131  5  4  4 0.0070122715
132  6  4  4 0.0080140245
133  1  5  4 0.0035061357
134  2  5  4 0.0046748477
135  3  5  4 0.0058435596
136  4  5  4 0.0070122715
137  5  5  4 0.0081809834
138  6  5  4 0.0093496953
139  1  6  4 0.0040070123
140  2  6  4 0.0053426830
141  3  6  4 0.0066783538
142  4  6  4 0.0080140245
143  5  6  4 0.0093496953
144  6  6  4 0.0106853661
145  1  1  5 0.0017530679
146  2  1  5 0.0023374238
147  3  1  5 0.0029217798
148  4  1  5 0.0035061357
149  5  1  5 0.0040904917
150  6  1  5 0.0046748477
151  1  2  5 0.0023374238
152  2  2  5 0.0031165651
153  3  2  5 0.0038957064
154  4  2  5 0.0046748477
155  5  2  5 0.0054539889
156  6  2  5 0.0062331302
157  1  3  5 0.0029217798
158  2  3  5 0.0038957064
159  3  3  5 0.0048696330
160  4  3  5 0.0058435596
161  5  3  5 0.0068174862
162  6  3  5 0.0077914128
163  1  4  5 0.0035061357
164  2  4  5 0.0046748477
165  3  4  5 0.0058435596
166  4  4  5 0.0070122715
167  5  4  5 0.0081809834
168  6  4  5 0.0093496953
169  1  5  5 0.0040904917
170  2  5  5 0.0054539889
171  3  5  5 0.0068174862
172  4  5  5 0.0081809834
173  5  5  5 0.0095444806
174  6  5  5 0.0109079779
175  1  6  5 0.0046748477
176  2  6  5 0.0062331302
177  3  6  5 0.0077914128
178  4  6  5 0.0093496953
179  5  6  5 0.0109079779
180  6  6  5 0.0124662604
181  1  1  6 0.0020035061
182  2  1  6 0.0026713415
183  3  1  6 0.0033391769
184  4  1  6 0.0040070123
185  5  1  6 0.0046748477
186  6  1  6 0.0053426830
187  1  2  6 0.0026713415
188  2  2  6 0.0035617887
189  3  2  6 0.0044522359
190  4  2  6 0.0053426830
191  5  2  6 0.0062331302
192  6  2  6 0.0071235774
193  1  3  6 0.0033391769
194  2  3  6 0.0044522359
195  3  3  6 0.0055652948
196  4  3  6 0.0066783538
197  5  3  6 0.0077914128
198  6  3  6 0.0089044717
199  1  4  6 0.0040070123
200  2  4  6 0.0053426830
201  3  4  6 0.0066783538
202  4  4  6 0.0080140245
203  5  4  6 0.0093496953
204  6  4  6 0.0106853661
205  1  5  6 0.0046748477
206  2  5  6 0.0062331302
207  3  5  6 0.0077914128
208  4  5  6 0.0093496953
209  5  5  6 0.0109079779
210  6  5  6 0.0124662604
211  1  6  6 0.0053426830
212  2  6  6 0.0071235774
213  3  6  6 0.0089044717
214  4  6  6 0.0106853661
215  5  6  6 0.0124662604
216  6  6  6 0.0142471547

prob documentation built on May 2, 2019, 12:20 p.m.