Comments

  • Mathematical Conundrum or Not? Number Six
    Most of my languages are very old - Fortran, BASIC, Pascal, C, Simula, LISP, Prolog. These days I mostly use R, and am toying with Python in case that turns out to be useful if I want to get into 'data science'. I think I managed to understand srap's PHP program, so I'll try to work through yours as well as part of a self-education exercise.

    It seems weird how variable names start with $. I suppose there's some carefully thought-out reason for that.
  • Mathematical Conundrum or Not? Number Six
    I've just been hit by the consequences of some of the issues raised in my Bayesian note. I didn't notice them before, but they're in there.

    The first is that, unless the player adopts an assumed distribution for X, they have no probability distribution by which they can calculate expected gains, so it's simply meaningless to ask what their expected gain is. We can ask what the host expects the gain to be if we like. Since the host knows what X is, the answer to that is:

    -X (a certain loss) if the host knows the player has the envelope with 2X
    +X (a certain gain) if the host knows the player has the envelope with X
    0 (an even chance of a gain or loss of X) if the host doesn't know which envelope the player has, but believes the choice of which envelope to put the doubled amount in was random with even odds.

    But what the host expects doesn't bear on the question, which is 'what should the player do?' (assuming the player's utility function is the identity function).

    Stripped of all the mathematics, my simplest answer to that (more sophisticated alternatives are possible) is: the player should estimate L, the maximum amount she thinks the game would be prepared to pay out. If Y<L/2 she should switch, otherwise she should not.

    This is consistent with the player assuming that X can be any amount between 0 and L/2, with uniform probability. That is the assumption used in @Srap Tasmaner's PHP program, with num_trials = L/2, if I've interpreted the PHP correctly (I may not be remembering the variable name exactly, but you'll know the one I mean).

    With that assumed distribution, the player will expect a zero gain if she switches regardless of the value of Y. But if she switches only if Y<L/2 the expected gain will be Y/2 for those cases.

    I predict that, if that sim is run with a strategy that only switches when Y<num_trials / 2, it will converge on a gain that averages L/4 across those trials and 3L/16 across all trials.

    Interestingly, the Bayesian note doesn't side completely with either prior 'side' of the argument. It shows that there exists a switching strategy that gives the player a strong expectation of gain over the Y they have seen, but it also shows that, if she has adopted an assumption of the distribution of X, and uses a strategy that switches regardless of the value of Y, her expectation of gain from switching is zero. The way we reconcile that with the fact that by switching she'll either gain Y or lose Y/2 is to observe that the probabilities of those two outcomes are not equal. The probabilities must be inferred from where the observed Y sits in the player's prior distribution for Y, which is inferred from her prior distribution for X. The higher Y is, the greater is the probability that it is the doubled amount, so the greater is the probability of losing Y/2 rather than gaining Y by switching.

    For detail, see the note. The simplest example I can think of is where the player assumes that X is either 10,000 or 20,000. Then her assumed distribution for Y is 10,000 (prob = 1/4), Y=20,000 (prob=1/2), Y=40,000 (prob=1/4). If she sees Y=40,000 she knows she has the doubled amount (given her prior assumed distribution of X), so she shouldn't switch. Otherwise she should. That strategy gives an expected gain of (1/4) . 10,000 - (1/4) . 10,000 + (1/4) . 20,000= 5,000. That gain is equal to the expected loss that arises if she also switches when Y=40,000 (lose 40,000 / 2 with probability 1/4, ie lose 5,000). But using a Bayesian switching strategy, she sets up an expected gain of 5,000.

    This also demonstrates why looking in the envelope makes a difference. If you don't look in the envelope, you can't use the above strategies, as they decide whether to switch based on the value of Y.
  • Relational Proof
    Perhaps you are referring to the fact that variable names have no meaning and can be freely swapped, a fact regularly used in physics when we want to change the summation index for an Einstein sum. That is correct, but we don't need any meta-rules to justify it. We just do something along the lines of what I wrote above, using the logical axioms of the system. I think the general approach is as follows:

    Say we have a formula F that uses variable a, and we want to replace a everywhere by b, where b is a variable symbol not currently used anywhere in a. Then we can do this as follows:

    - List all the sub-formulas of F in which a is universally quantified. Call them F1,....Fn. We only need to consider universal quantification because existential quant can be written in terns of universal quant and negation.
    - Use the logical axiom Q5 (axiom schema of specification) together with Modus Ponens, to replace 'a' by 'b' in all the subformulas.
    - Use the Generalisation Theorem to put '∀b' in front of each subformula.
    - By reversing that, we can show that each subformula is logically equivalent to the version that has all 'a's replaced by 'b's.
    - It is laborious, but not difficult, to show that F <-> F', where F' is F with 'a' changed to 'b' in all subformulas in which 'a' is universally quantified.
    - We may have some free instances of 'a' remaining in F'. To get rid of those, we first use the Generalisation Theorem to put ∀a in front of F', call that F''.
    - We then use Q5 again to replace all free 'a's by 'b' and remove the ∀a.

    We now have a formula F'' that is logically equivalent to F, but has all instances of 'a' replaced by 'b'.

    All a bit laborious, but what it demonstrates is that we don't need any meta-powers to swap variable names. It can be justified by the logical axioms themselves.

    I can't resist the temptation to use one of my favourite words - this means that variable symbols are fungible, which means they can be freely swapped, like electricity, money or natural gas. Their fungibility can be proven by the logical axioms, and the problem in the OP is a particular example of that general fungibility.
  • Relational Proof
    What do you mean by a meta-language? In FOPL all we have are a language, logical axioms and rules of inference.
  • Relational Proof
    Syntactically equivalent means that the symbol strings, once any language-extension abbreviations have been replaced by their equivalents in the core language, are identical. The strings are not identical, so they are not syntactically equivalent.
  • Relational Proof
    We have to be careful using the word 'meaning' in logic, because in natural language 'meaning' is associated with 'semantics', but semantics in logic refers to a whole new area involving models and interpretations, which need not be invoked when we are just talking about theorem proving as above.

    In the absence of an Interpretation, in the full model-theory sense of that word, there is no meaning of the symbol string ∀y.∀x.p(y,x). It is just a symbol string that is syntactically correct in a given language and from which can be deduced various different but logically equivalent symbol strings using the available logical and non-logical axioms and rules of inference.

    A cleaner example is the two strings

    ∀x.q(x)

    and

    (r → r) ∧ ∀x.q(x)

    The two are syntactically very different, but logically equivalent in most logical systems.
    In the absence of a selected Interpretation, would one say they mean the same thing? Logic theory is silent on that question.


    EDIT: As pointed out by @Cabbage Farmer, this proves something different from what's in the OP. I'll leave this here to avoid confusion, and post a proof that relates to the actual question below.

    The proof, using the rules of a Hilbert System, and referencing logical axioms, axiom schemas and metatheorems using the labels in that link, is:

    1. ∀y.∀x.p(y,x) ⊢∀y.∀x.p(y,x)
    2. ∀y.∀x.p(y,x) ⊢∀y.∀x.p(y,x) → ∀x. p(y,x) [Q5 with x:=x]
    3. ∀y.∀x.p(y,x) ⊢∀x.p(y,x) [Modus Ponens on 1, 2]
    4. ∀y.∀x.p(y,x) ⊢∀x.p(y,x)→ p(y,x) [Q5 with y:=y]
    5. ∀y.∀x.p(y,x) ⊢p(y,x) [Modus Ponens on 3, 4]
    6. ∀y.∀x.p(y,x) ⊢∀y.p(y,x) [Generalisation metatheorem on 5]
    7. ∀y.∀x.p(y,x) ⊢∀x.∀y.p(y,x) [Generalisation metatheorem on 6]
    8. ⊢∀y.∀x.p(y,x)→∀x.∀y.p(y,x) [deduction theorem (metatheorem) on 7]

    We can then switch x and y and follow the same steps to prove that

    ⊢ ∀x.∀y.p(y,x)→∀y.∀x.p(y,x)

    and putting the two together we get

    ⊢∀y.∀x.p(y,x) ↔∀x.∀y.p(y,x)

    So we have proven that the two are logically equivalent, despite being syntactically very different. Sometimes the symbol ≡ is used to denote full syntactic equivalence, as distinct from logical equivalence (↔). That can be useful when alternate forms of notation are used in the same system. For instance when writing in a Hilbert system, in which the only official operators are ¬ and →, it is sometimes convenient to use the symbols ∨ and ∧ as shortcuts, so that (a∨b) is shorthand for (¬a→b) and (a∧b) is shorthand for ¬(a→¬b). Then one could write (a∨b) ≡ (¬a→b) meaning that, on a formal level, the two are syntactically identical because the LHS is just an informal abbreviation for the RHS. But we could not write

    ∀x.q(x) ≡ (r → r) ∧ ∀x.q(x)

    as the two are syntactically distinct, even though in most logics they are logically equivalent.

    Not all texts distinguish between ↔ and ≡ which I think is a pity because the distinction is often useful when one is using extended symbol sets.
  • Relational Proof
    I think it's asking the student to prove that universal quantifiers commute with one another, which is not given as an axiom in most logical systems, but can be proven. Existential quantifiers also commute with one another. But universal and existential quantifiers do not commute with one another.
  • Relational Proof
    It depends on what logical system you are using. In many axiomatisations of first-order predicate logic there is an axiom schema of Universal Quantification that allows you to put a universal quantification before a formula of any variable that is free in the formula. Doing that to p(x,y) for first x and then y gives the desired result.
  • Mathematical Conundrum or Not? Number Six
    I have to go to bed now. I'll look in again tomorrow if time permits.
  • Mathematical Conundrum or Not? Number Six
    The question is ill-defined. To answer it, you'd have to specify your algorithm, which you have not done. If we take srap's PHP program as the algorithm, the expected value of the winnings from the switching and non-switching strategy would be the same but, as I've pointed out twice now, that simulation does not reflect the information available to the player. All it tells you is that, if you know what X is, a strategy of switching has the same expected reward as a strategy of not switching. But the player doesn't know what X is, so it doesn't reflect the problem.
  • Mathematical Conundrum or Not? Number Six
    As described in the post immediately above, that setup does not reflect the player's knowledge and expectations.
  • Mathematical Conundrum or Not? Number Six
    I did my best to read your code. Although I don't speak much PHP I think I can see what it's doing. It appears to me that it does not reflect the information available to the player because it treats X as a variable uniformly distributed over the range from 1 to num_trials whereas, once the player has seen the amount Y in the first envelope, they have narrowed the possibilities for X down to two possible values: Y or Y/2. So if that interpretation is correct I would say the code does not reflect the player's expectations.
  • Mathematical Conundrum or Not? Number Six
    It's a meaningless question. 'on average' is not a meaningful statistical concept. We can only meaningfully talk in terms of expected values. The expected values depend on the distributions of the random variables, and those distributions will depend on the information available to the person that is forming the expectation.
  • Mathematical Conundrum or Not? Number Six
    I don't answer questions based on false premises. Have you stopped beating your wife?
  • Mathematical Conundrum or Not? Number Six
    Do you have another question? If so, what is it?
  • Mathematical Conundrum or Not? Number Six
    It bears no resemblance to the analysis. For a start the analysis is about expectations, and your statement doesn't mention them. If you believe it fairly represents the analysis, the onus is on you to justify that belief.
  • Mathematical Conundrum or Not? Number Six
    If the distinction between 'maximise expected winnings' and 'what she should do' is irrelevant (which it is if we accept the implicit assumption that utility=identity, which I've said several times now that I'm prepared to do) it's hard to see why you devoted this post to emphasising the distinction.

    Further, my detailed analysis adopts that implicit assumption by asking how the player can maximise her expected winnings, not what she 'should do'.
  • Mathematical Conundrum or Not? Number Six
    Yes, I imagine they would aim to maximise their expected increase in utility, not their expected monetary gain.

    So for instance if the envelope contains $1m and there's something I desperately want that costs $750,000, but nothing much I want that costs between $1m and $2m, I would be silly to swap, because my loss of utility on halving my winnings is greater than my gain in utility from doubling them.

    But I am happy to go along with the implicit assumption that has been made by all commenters, that the player's utility function is the identity function.
  • Mathematical Conundrum or Not? Number Six
    But whatever value L has, R has 5/4 of that value. So I consider R. But whatever value R has, L has 5/4 of that value. So I consider L again.Srap Tasmaner
    I don't believe that description correctly represents the analysis.
  • Mathematical Conundrum or Not? Number Six
    I don't understand how your question relates to the quote. Can you elaborate?
  • Mathematical Conundrum or Not? Number Six
    I covered that on the first page, but that was before you joined the discussion. What the player 'should do' depends on her utility function, and none of the analysis to date has addressed the question of utility functions. Implicitly, they have assumed the utility function is the identity function, rather than the usual concave-down assumption, which reduces the problem to the player selecting the option from which she expects the highest gain, based on the available information.
  • Mathematical Conundrum or Not? Number Six
    That is correct, but has no bearing on the problem. The problem asks about the player's expectation, not the game host's expectation, which is what the procedure you suggest would reflect.
  • Mathematical Conundrum or Not? Number Six
    What evidence do you have for that claim? By all means present it and we can discuss it.
  • Mathematical Conundrum or Not? Number Six
    I suspect you are basing that claim on some computer simulation. Firstly, a computer simulation cannot prove anything in probability theory. Secondly, if it even suggests what you believe it does, I am convinced it contains an inappropriate assumption. Present your code and we can discuss it.
  • Mathematical Conundrum or Not? Number Six
    You've agreed that Y must be defined in terms of X. X is fixed.Snakes Alive
    That doesn't prevent us from modelling our uncertainty about it by representing it as a random variable. In Bayesian analysis we model a fixed, unknown population parameter like X as a random variable from an assume distribution we call the 'prior'. We then use new information to update that distribution to a more accurate 'posterior distribution'.

    I did say when presenting the Bayesian analysis that people who don't accept Bayesian methods won't agree.
  • Mathematical Conundrum or Not? Number Six
    Now eliminate the Y altogether, do the calculation, and you'll see that your expected value is 1.5X regardless of whether you switch or not.Snakes Alive
    If you define Y in terms of X, then everything you write with Y can (must) be rewritten in terms of X.Snakes Alive
    Eliminating Y is making X the numéraire. That's why you need to address the numéraire issue, as explained in this post. When we use X as numéraire, the expected gain from switching is zero units of X, but when the numéraire is dollars, it is a gain.
  • Mathematical Conundrum or Not? Number Six
    The point is that it is not a possibility that the exhaustive disjunctive possibilities of what's contained in the other envelope are 5 and 20.Snakes Alive
    What do you mean by 'exhaustive disjunctive possibilities'?
    it's known already that for some X, the amount in the other envelope is X or 2X. But 5 and 20 are not X and 2X for any value of XSnakes Alive
    That's all correct, but is not inconsistent with my note. Nowhere does it say that 5 and 20 are X and 2X, given we have seen that Y=10. Rather, we know that X is either 5 or 10, so either

    • we have X in the envelope we opened, so that X = Y = 10; OR
    • X is in the other envelope, so we have Y = 2X = 10 and X=5 is in the other envelope.
  • Mathematical Conundrum or Not? Number Six
    You can't use Y as a value defined independently of X and average across possibilities using that value.Snakes Alive
    We agree on that. Y and X are interdependent. That's why I define Y as



    where B is a Bernoulli random variable with probability 0.5, that is independent of X. B is independent of X, but Y is not.
  • Mathematical Conundrum or Not? Number Six
    it is not metaphysically possible for the unopened envelope to be 'either 5 or 20' (read as an exhaustive disjunction), since neither of these is twice the other (Snakes Alive
    Can you justify that 'since'? There is no justification provided in the sentence in which it occurs, because the words following it have no logical relation to the words before it. It sounds like you're saying that, having observed 10 in the envelope, you now believe that the other envelope might contain some amount other than 5 or 20. If that's not what you're saying, what are you saying?

    Also, what is 'metaphysically possible' and how does that differ from 'possible'?
  • Mathematical Conundrum or Not? Number Six
    Then let's go with "inconsistency": given such a pair of envelopes, you can readily construct a pair of arguments that tell you each has a higher expected value than the other. I would prefer finding that such arguments are invalid.Srap Tasmaner
    Those results are both correct, and it's because each is done from the point of view of observing that envelope - two opposite points of view. It's analogous to how two spaceships travelling at half the speed of light relative to one another both measure time as going more slowly in the other spaceship. That 'feels' inconsistent but when you dig into it, trying to locate and fix the inconsistency, you find there isn't one.
    I'm still not seeing it. We've done to death the example of finding £10 and you calculate an expected gain of £2.50. Or you can do a generic calculation and show an expected gain of £Y/4, for any value of Y.Srap Tasmaner
    That's right, in this case using either dollars or the value of Y as numéraire gives the same result - an expected gain equal to Y/4. That's why I said 'can' rather than 'does'. But using X as numéraire gives a different result - an expected gain of zero. It really is worth spending the time to come to grips with the numéraire concept. It has many more important applications than just in probability.

    Also, the Bayesian calculation now has the graphs in. I think they look rather nice.
  • Mathematical Conundrum or Not? Number Six
    Simply designating whatever as Y and then doing your calculations in terms of Y is enough to get absurdity.Srap Tasmaner
    I haven't seen any genuine absurdities in the thread so far. Assertions of absurdity, yes, but not real ones.

    In general, it's best to avoid arguments based on 'absurdity'. If we did that, we wouldn't have quantum mechanics, and so no computers. Best stick to 'contradiction' as the grounds for rejecting a premise.

    I have a particularly strong aversion to arguments based on absurdity because they are beloved of Christian fundamentalist apologists like William Craig, who argue that 'absurdities' - by which they just mean something a bit surprising - arise from not believing the fundamentalist dogma. Which is no reason for us to adopt their dogma, because the world is a very surprising place.
    More importantly, the value of the selected envelope need not be known to you the agent.Srap Tasmaner
    If we don't open the envelope then the calculation is completely different and in this case only coincidentally gives the same result. This is what is called a Numéraire issue. Changing the numéraire in terms of which a profit is calculated can create a profit out of nothing, or reduce a profit to zero. This is an important principle in derivative pricing.

    Say I buy a (troy) ounce of gold for $1000, the price then goes up to $2000 per ounce. In dollars I have made $1000 profit, but in ounces of gold I have made no profit, because I had 1 oz before and I still have 1 oz. I can convert that zero ounces profit to dollars by multiplying by the gold price of $2000/oz, and I still get $0. How can my profit be both $1000 and $0? Because the two calculations use different numéraires, so they are fundamentally fdifferent calculations. Conversely, If I put the $1000 in bank account and earn $1 interest while the price of gold goes from $1000 up to $2000. Then with dollars as a numéraire my profit is $1 but with oz of gold as numéraire I have gone from 1 oz equiv to $1001/2000 $/oz = 0.5005 oz, so I've made a loss of 0.4995 oz, which is equivalent to $999.

    The moral is - changing numéraire can change the answer, even if you subsequently convert the result back into the units of the original numéraire. When you open the envelope and look at what's inside, your numéraire is dollars. When you don't open it your numéraire is 'value of contents of the first envelope', ie Y. So it's a different calculation that can validly have a different result.

    There's another numéraire we can use, which is X, the unknown amount of the lower-valued IOU. Using that as numéraire, the expected gain is zero, whereas when we use dollars as a numéraire, the expected gain is positive.
  • On logical equivalence
    I think it must be somebody else that said that. I can't see it in what I wrote.
  • Mathematical Conundrum or Not? Number Six
    The difference between these two is not mysterious. Calculation (a) is done from the point of view of the game host, who knows the value of X, and so can treat it as a constant. In this problem X is known and Y is unknown.

    Calculation (b) is done from the point of view of the player, for whom X is an unknown, and hence must be treated as a random variable, if any calculation is to be done at all. In this problem Y is known and X is unknown. It's in a sense the reverse (a).

    The calculations give different answers because they are different probabilistic scenarios - just as your calculation on the outcome of a coin I toss will be different from the calc I do when I've already looked at the toss result.

    Each calc is correct for the perspective to which it pertains.

    I'll have another go at inserting the graphs today.
  • Maxims
    Try! Do or do not is a false dichotomy.
  • On logical equivalence
    I'd like to discuss the word ''is'' which logically translates to ''=''. When I say ''Trump is the POTUS'' I mean Trump=POTUS.TheMadFool
    You think that's bad. What about 'She is hungry'?

    The problem is with the verb 'to be', which is a jumble of vagueness and equivocations. That's why somebody invented E*Prime to avoid its use.

    The French have the right idea. They say 'I have hunger', which avoids the whole problem. The E*Prime way of saying that Macron 'is' the president of the Republic of France would be something like 'Monsieur Emanuel Macron holds the office of president of the Republic of France.'
  • Mathematical Conundrum or Not? Number Six
    I've finally found time to work out my full Bayesian analysis of the problem. For those that are interested, it is here. Non-Bayesians may not like it, because it takes the standard Bayesian approach of using a probabilistic distribution for unknown parameters, even when the person setting the parameter did not do so probabilitistically. But if we reject that approach we'll have to reject an enormous part of modern statistical techniques.

    The essence is that the information gained by looking at the amount in the envelope allows one to refine one's prior distribution for the possible values of X - the lower of the two amounts. When the observed amount is low the expected gain will be positive and when it is high it will be negative. The note shows how to calculate these expectations based on the prior distribution adopted for X.

    In the simplest case, where our prior for X is a uniform distribution on (0,L], where we might choose L as say half the entire budget of the game show, the result is that we should not switch if the observed amount y is greater than L, because it must be the doubled amount. But otherwise we should switch, and the expected gain from doing so is y/2. This is greater than the y/4 expected gain that was discussed above. I think that may have something to do with the fact that we remove the losses that would occur from switching when y>L, thereby increasing the expected gains when we do switch.

    I will include some graphs I made if I can work out a way to get latex to cooperate on that. It worked last time I tried that, but not today.
    Any observations or comments, @Michael? @Srap Tasmaner?
  • Does QM, definitively affirm the concept of a 'free will'?
    All the better - then you have the perfect mindframe to willingly accept the glorious uncertainty of the universe, and not chase after such meaningless trinkets as 'definitive affirmation'.
  • Does QM, definitively affirm the concept of a 'free will'?
    I would post this elsewhere where talk about physics is mentioned; but, other forums aren't as philosophical as this one or allow talk about philosophy.Posty McPostface
    I suspect you are thinking of physicsforums. Topic like this are shut down there as soon as they come up because it is speculation, not physics.

    Speculate about it as much as you like. Many do, and enjoy it tremendously. But please bear in mind that what you're doing is considering different possible interpretations of physics. There is no question whatsoever of QM 'definitively affirming' your conjecture.
  • Mathematical Conundrum or Not? Number Six
    I'm still not sure I understand your question. You've asked about the minimum possible value of X. Do you mean the minimum that I think is possible for X, given that I've just observed Y in the envelope? That minimum is Y/2.

    Or do you mean the minimum amount I could imagine having been chosen for X, without my having opened the envelope? I'm pretty sure I already answered that (but the answer has been buried somewhere amongst all the posts since then), and said that the amount cannot be zero or less, so there is no minimum, but 0 is the infimum.

    If you mean something other than that, can you clarify and I'll try to answer it? Thanks.

    In the meantime, I'm finding some interesting things with my Bayesian calcs, but the answers keep on changing - probably cos I'm scribbling it on scrappy bits of paper, in between meetings, and I keep losing them. Hopefully I'll come up with something coherent and stable and can report it here.
  • Mathematical Conundrum or Not? Number Six
    And I asked you last night about the minimum possible value of X. Your response then was that what matters is not what might or might not be put in the envelope, but whether you the player have reason to exclude a given value.Srap Tasmaner
    Are you sure that was me? It doesn't sound familiar, but maybe I've just forgotten. Can you link the exchange?

    FWIW I'm imagining X can be any real number above zero, so there is no minimum value. In order to make that possible, the envelope has to contain an IOU to the value of some real number, not notes and coins, otherwise the min poss value is one penny.

    My attempted full Bayesian calc is surprising so far. Assuming a prior distribution for X of uniform on (0,L] for some large L, I'm getting an expected gain from switching, given an observation of y in the envelope, of (5/8)y, which is more than the y/4 from previous calculations. Needless to say, I'm reviewing it fairly critically.