Archive for ChatGPT

more [grass]hope

Posted in Books, Kids, pictures, Statistics with tags , , , , on May 16, 2023 by xi'an

Following my earlier post on the terrible performances of ChatGPT for a grasshopping riddle, Bob Carpenter sent me his interaction with GPT4, using the same entry. Here is the outcome he obtained. The answer is correct, but the reasoning is wrong.

GPT4: This is a classic problem of infinite series and expected values in probability theory.

Given the nature of the grasshopper’s random walk, at each jump, it has an equal probability (1/2) of hopping to the left or to the right. Thus, we expect that, on average, it won’t be moving away from the origin (0) because the positive and negative jumps should cancel out.

However, you are asking for the expected absolute distance from the origin, which can’t be negative by definition. The key to solving this problem is to recognize that the expected value of the absolute value of a random variable is not the same as the absolute value of its expected value.

Since the absolute value function is not linear, we cannot pull the expected value inside of it. Instead, we need to directly compute the expected value of the absolute distance from the origin, which is a sum of an infinite series.

The nth jump’s absolute distance is 1/(2^n), and it has a probability of 1/2 to go either left or right. Therefore, the expected absolute distance from the origin after the nth jump is (1/2) * 1/(2^n).

Adding up these expected distances for all jumps gives us the total expected absolute distance from the origin:

E = (1/2) * (1/2 + 1/4 + 1/8 + 1/16 + …)

The sum inside the parentheses is a geometric series with a = 1/2 and r = 1/2. The sum of an infinite geometric series is a / (1 – r), so the sum of this series is (1/2) / (1 – 1/2) = 1.

Therefore, E = (1/2) * 1 = 1/2

So on average, the grasshopper is expected to be 1/2 unit away from the origin after infinitely many jumps. The expected distance it travels to return to the origin is thus 1/2 unit.

grass hopping on the wrong fgpt

Posted in Statistics with tags , , on May 14, 2023 by xi'an

Checking the R coding abilities of ChatGPT, I entered the latest Riddler puzzle that asks for the expected value of the stationary distribution of a slowing-down random walk over the real line when the N-th jump from x is to x±2-N. Which is ½ since the limiting distribution is uniform over (-1,1). The first proposed solution kept returning 0 due to a poor initialisation (and a wrong understanding of the puzzle):


The second attempt does not run (because there is no exact zero in the cumulated distance)and does not make sense (because the random walk has no stopping rule).  The third attempt runs (!) but again misses the point by adding the absolute jump values until a return to zero. And even pointing out the mistake to ChatGPT does not result into a fourth correct solution

AIxcuse me?!

Posted in Statistics with tags , , , , , , , on May 3, 2023 by xi'an

Estimating means of bounded random variables by betting

Posted in Books, Statistics, University life with tags , , , , , , , , , , , , , , , , , , , , , , , on April 9, 2023 by xi'an

Ian Waudby-Smith and Aaditya Ramdas are presenting next month a Read Paper to the Royal Statistical Society in London on constructing a conservative confidence interval on the mean of a bounded random variable. Here is an extended abstract from within the paper:

For each m ∈ [0, 1], we set up a “fair” multi-round game of statistician
against nature whose payoff rules are such that if the true mean happened
to equal m, then the statistician can neither gain nor lose wealth in
expectation (their wealth in the m-th game is a nonnegative martingale),
but if the mean is not m, then it is possible to bet smartly and make
money. Each round involves the statistician making a bet on the next
observation, nature revealing the observation and giving the appropriate
(positive or negative) payoff to the statistician. The statistician then plays
all these games (one for each m) in parallel, starting each with one unit of
wealth, and possibly using a different, adaptive, betting strategy in each.
The 1 − α confidence set at time t consists of all m 2 [0, 1] such that the
statistician’s money in the corresponding game has not crossed 1/α. The
true mean μ will be in this set with high probability.

I read the paper on the flight back from Venice and was impressed by its universality, especially for a non-asymptotic method, while finding the expository style somewhat unusual for Series B, with notions late into being defined if at all defined. As an aside, I also enjoyed the historical connection to Jean Ville‘s 1939 PhD thesis (examined by Borel, Fréchet—his advisor—and Garnier) on a critical examination of [von Mises’] Kollektive. (The story by Glenn Shafer of Ville’s life till the war is remarkable, with the de Beauvoir-Sartre couple making a surprising and rather unglorious appearance!). Himself inspired by a meeting with Wald while in Berlin. The paper remains quite allusive about Ville‘s contribution, though, while arguing about its advance respective to Ville’s work… The confidence intervals (and sequences) depend on a supermartingale construction of the form

M_t(m):=\prod_{i=1}^t \exp\left\{ \lambda_i(X_i-m)-v_i\psi(\lambda_i)\right\}

which allows for a universal coverage guarantee of the derived intervals (and can optimised in λ). As I am getting confused by that point about the overall purpose of the analysis, besides providing an efficient confidence construction, and am lacking in background about martingales, betting, and sequential testing, I will not contribute to the discussion. Especially since ChatGPT cannot help me much, with its main “criticisms” (which I managed to receive while in Italy, despite the Italian Government banning the chabot!)

However, there are also some potential limitations and challenges to this approach. One limitation is that the accuracy of the method is dependent on the quality of the prior distribution used to set the odds. If the prior distribution is poorly chosen, the resulting estimates may be inaccurate. Additionally, the method may not work well for more complex or high-dimensional problems, where there may not be a clear and intuitive way to set up the betting framework.

and

Another potential consequence is that the use of a betting framework could raise ethical concerns. For example, if the bets are placed on sensitive or controversial topics, such as medical research or political outcomes, there may be concerns about the potential for manipulation or bias in the betting markets. Additionally, the use of betting as a method for scientific or policy decision-making may raise questions about the appropriate role of gambling in these contexts.

being totally off the radar… (No prior involved, no real-life consequence for betting, no gambling.)

même pas peur [not afrAId]

Posted in Books, Kids, Travel, University life with tags , , , , , , , , , , , , , on March 30, 2023 by xi'an

Both the Beeb and The New York Times are posting tonight about a call to pause AI experiments, by AI researchers and others, due to the danger they could pose to humanity. While this reminds me of Superintelligence, a book by Nick Bostrom I found rather unconvincing, and although I agree that automated help-to-decision systems should not become automated decision systems, I am rather surprised at them setting the omnipresent Chat-GPT as the reference not to be exceeded.

“AI systems with human-competitive intelligence can pose profound risks to society and humanity (…) recent months have seen AI labs locked in an out-of-control race to develop and deploy ever more powerful digital minds that no one – not even their creators – can understand, predict, or reliably control.”

The central (?) issue here is whether something like Chat-GPT can claim anything intelligence, when pumping data from a (inevitably biased) database and producing mostly coherent sentences without any attention to facts. Which is useful when polishing a recommendation letter at the same level as a spelling corrector (but requires checking for potential fake facts inclusions, like imaginary research prizes!)

“Contemporary AI systems are now becoming human-competitive at general tasks, and we must ask ourselves: Should we let machines flood our information channels with propaganda and untruth? Should we automate away all the jobs, including the fulfilling ones? Should we develop nonhuman minds that might eventually outnumber, outsmart, obsolete and replace us? Should we risk loss of control of our civilization?”

The increasingly doom-mongering tone of the above questions is rather over the top (civilization, nothing less?!) and again remindful of Superintelligence, while spreading propaganda and untruth need not wait super-AIs to reach conspiracy theorists.

“Such decisions must not be delegated to unelected tech leaders. Powerful AI systems should be developed only once we are confident that their effects will be positive and their risks will be manageable (…) Therefore, we call on all AI labs to immediately pause for at least 6 months the training of AI systems more powerful than GPT-4. This pause should be public and verifiable, and include all key actors. If such a pause cannot be enacted quickly, governments should step in”

A six months period sounds like inappropriate for an existential danger, while the belief that governments want or can intervene sounds rather naïve, given for instance that they lack the ability to judge of the dangerosity of the threat and of the safety nets to be imposed on gigantic black-box systems. Who can judge on the positivity and risk of a billion (trillion?) parameter model? Why is being elected any guarantee of fairness or acumen? Beyond dictatures thriving on surveillance automata, more democratic countries are also happily engaging into problematic AI experiments, incl. AI surveillance of the incoming Paris Olympics. (Another valuable reason to stay away from Paris over the games.)

“AI research and development should be refocused on making today’s powerful, state-of-the-art systems more accurate, safe, interpretable, transparent, robust, aligned, trustworthy, and loyal. In parallel, AI developers must work with policymakers to dramatically accelerate development of robust AI governance systems.”

While these are worthy goals, at a conceptual level—with the practical issue of defining precisely each of these lofty adjectives—, and although I am certainly missing a lot from my ignorance of the field,  this call remains a mystery to me as it sounds unrealistic it could achieve its goal.