two.envelopes <- function(){ x <- (rnorm(1)) x <- (abs(as.numeric(format(round(x, 3)))))*10 #randomly selects a number #limits the number of decimal places x can have and muiltples x by 10 to simluate realistic dollar values. p <- c(x,2*x) A <- sample(p, 1, replace=F) #creates a vector with x and 2x then randomly selects one for A. if (A == x) { B <- 2*x } else { (B <- x) } return(c(A,B)) } #sets the value for B based on: if A = x then B = 2x or if A = 2x then B = x g <- t(replicate(100, two.envelopes())) head(g) #results [,1] [,2] [1,] 5.23 10.46 [2,] 5.48 10.96 [3,] 25.60 12.80 [4,] 6.17 12.34 [5,] 3.88 7.76 [6,] 7.59 15.18
two.envelopes <- function(){ x <- (runif(1)) x <- (abs(as.numeric(format(round(x, 3)))))*10 #randomly selects a number #limits the number of decimal places x can have and muiltples x by 10 to simluate realistic dollar values. p <- c(x,2*x) A <- sample(p, 1, replace=F) #creates a vector with x and 2x then randomly selects one for A. if (A == x) { B <- 2*x } else { (B <- x) } return(c(A,B)) } #sets the value for B based on: if A = x then B = 2x or if A = 2x then B = x g <- t(replicate(100, two.envelopes())) head(g) #results [,1] [,2] [1,] 27.20 13.60 [2,] 28.72 14.36 [3,] 12.49 24.98 [4,] 12.95 25.90 [5,] 61.18 30.59 [6,] 2.66 1.33
two.envelopes<- function(){ x <- (rcauchy(1, location = 0, scale = 1)) x <- (abs(as.numeric(format(round(x, 3)))))*10 #randomly selects a number #limits the number of decimal places x can have and muiltples x by 10 to simluate realistic dollar values. p <- c(x,2*x) A <- sample(p, 1, replace=F) #creates a vector with x and 2x then randomly selects one for A. if (A == x) { B <- 2*x } else { (B <- x) } return(c(A,B)) } #sets the value for B based on: if A = x then B = 2x or if A = 2x then B = x g <- t(replicate(100, two.envelopes())) head(g) [,1] [,2] [1,] 10.22 20.44 [2,] 24.54 12.27 [3,] 2.05 4.10 [4,] 8.96 4.48 [5,] 15.44 7.72 [6,] 13.74 27.48
two.envelopes <- function(){ x <- (sample(1:100, 1)) #randomly selects a number p <- c(x,2*x) A <- sample(p, 1, replace=F) #creates a vector with x and 2x then randomly selects one for A. if (A == x) { B <- 2*x } else { (B <- x) } return(c(A,B)) } #sets the value for B based on: if A = x then B = 2x or if A = 2x then B = x g <- t(replicate(100, two.envelopes())) head(g) #results [,1] [,2] [1,] 27 54 [2,] 136 68 [3,] 33 66 [4,] 14 28 [5,] 30 60 [6,] 57 114
two.envelopes <- function(){ x <- (rnorm(1)) x <- (abs(as.numeric(format(round(x, 3)))))*10 #randomly selects a number #limits the number of decimal places x can have and muiltples x by 10 to simluate realistic dollar values. p <- c(x,2*x) A <- sample(p, 1, replace=F) #creates a vector with x and 2x then randomly selects one for A. if (A == x) { B <- 2*x } else { (B <- x) } return(c(A)) } #sets the value for B based on: if A = x then B = 2x or if A = 2x then B = x g <- replicate(10000, two.envelopes()) two.envelopes.s <- function(){ x <- (rnorm(1)) x <- (abs(as.numeric(format(round(x, 3)))))*10 #randomly selects a number #limits the number of decimal places x can have and muiltples x by 10 to simluate realistic dollar values. p <- c(x,2*x) A <- sample(p, 1, replace=F) #creates a vector with x and 2x then randomly selects one for A. if (A == x) { B <- 2*x } else { (B <- x) } return(c(B)) } #sets the value for B based on: if A = x then B = 2x or if A = 2x then B = x g.s <- replicate(10000, two.envelopes()) library(ggplot2) plot(g) plot(g.s) ggplot() + aes(g)+ geom_histogram(binwidth=10, colour="black", fill="white") ggplot() + aes(g.s)+ geom_histogram(binwidth=10, colour="black", fill="white") ks.test(g, g.s) #K-S test results p-value will be approximate in the presence of ties Two-sample Kolmogorov-Smirnov test data: g and g.s D = 0.0077, p-value = 0.9283 alternative hypothesis: two-sided
3. Treat X as known and Y as unknown. Then the switch gain has a distribution of X or -X with even odds, so the expected switch gain is zero. This is the approach defended by srap. The approach is coherent but it begs the question of why it is valid to model lack of knowledge about Y/X by randomness, but not lack of knowledge about X. — andrewk
If you can show me how to respect this difference within a subjective framework, I'd be all for it. — Srap Tasmaner
Because you can't tell, you have two options: take Y into account anyway, or ignore it. These are two perspectives on decision making, and neither really causes unpleasant surprises, because all that changes is the reference system. — Dawnstorm
Yes, my point was that the lottery example is a very bad description of a sample space. In fact, It is the archtype for just that. But so is ignoring that you are assuming a distribution of amounts as well as whether you picked high or low. Maybe if you looked at my examples, you'd understand this. That was also a point I made.That is a very bad understanding of what a sample space and an event is. You are not applying your Principle of Indifference there, which states from your link: "The principle of indifference states that if the n possibilities are indistinguishable except for their names, then each possibility should be assigned a probability equal to 1/n." n in this case would be the total possible combinations of the lottery numbers.
If you came at the problem from here, you'd realize at some point that the clever thing to do is introduce a single variable X that is orthogonal to your choice and orthogonal to which envelope has which value. |X - 2X| = X, no matter the rest. It gives you an invariant description of the sample space so that you can properly measure the consequences of your decisions. — Srap Tasmaner
I pointed out a few times that the sample space of event R and the sample space of event S are equal subsets of each other, which means mathematically we can treat them the same. I also pointed out that as soon as you introduce Y they are no longer equal subsets and therefore mathematically cannot be treated the same.
Here is an example. If Z=M and N=M then Z=N. — Jeremiah
We define A and B as: If A=Y=X then B=2X or if A=Y=2X then B=X, where Y is the amount you see opening envelope A and X is the unknown amount originally selected by the facilitator.
My claim is then that the only possible outcomes for B is X or 2X.
Proof:
For all of Y, Y is a positive real number, such that Y=X or Y=2X, where X is some positive real number.
You are handed A and you see Y inside.
There are two cases here:
Case One
A=Y=X
By definition of A and B if A=Y=X then B=2X therefore B=2X
Case Two
A=Y=2X
By definition of A and B if A=Y=2X then B=X therefore B=X.
Those are the only two possible cases for B therefore by the definition of a sample space the sample space for B is [X,2X] — Jeremiah
What? You don't want to address a correct analysis, until I weed through pages of debate that appears to be inconclusive? Because I can guarantee you, that applying my correct analysis can resolve them.I am not doing this, not until you actually read all of my posts in this thread. — Jeremiah
Since Pr(L=L1) divides out, we don't need to know it. You are confusing the fact you can take a shortcut to get this result, with that shortcut being logically correct. — JeffJo
What you meant when you called it a "data science," is that it tries to apply the concepts of theoretical probability to real-world situations. — JeffJo
That isn't as useful as you might think. You can assert how that independence is obvious, since the random variable R (where R is 1/2 or 2 if you picked low or high) is chosen without knowledge of the random variable L (the low value of the pair). But all this independence means is, for any values of the unknowns L1 and R1, that:Doesn't this amount to saying that the loading of the envelopes and the selection of an envelope are independent events,
There is an easier way, but it applies only if you don't know what is in your envelope. — JeffJo
Get involved in philosophical discussions about knowledge, truth, language, consciousness, science, politics, religion, logic and mathematics, art, history, and lots more. No ads, no clutter, and very little agreement — just fascinating conversations.