Measuring Hallucination in Large Language Models: A Probabilistic Study of Context Persistence Effects
Arhat Anil Dahiwale, Mithunvisvesh Sureshkumar, Sree Varun Manoj Kumar, Meera K. Nagendra Rao, Venkatesh Bajjareddy, Rashmi Mogenahalli Ranganath, Yuqing LinIn this paper, a semi-deterministic approach is introduced for evaluating the answer-and-reasoning reliability of large language models using propositional logic and Bernoulli random variables. We focus on an operational class of hallucination defined by failures in final-answer correctness and/or reasoning validity, which is distinct from factuality hallucination involving fabricated world knowledge. Hallucination is represented as the logical negation of the conjunction of answer correctness and reasoning validity, enabling probabilistic evaluation. The framework was evaluated using Gemini 3.1 Pro and Claude Sonnet 5 on probability and random process (PRP) problems. For each model, 90 questions were presented in five cycles per condition, producing 450 responses per model-condition combination and 1800 responses in total. The Independent and Persistent conditions differed in conversational state, session structure, and question-order structure; therefore, observed differences are interpreted as condition-level associations. For Gemini 3.1 Pro, the hallucination probability increased from 20.44% to 36.22% (77.2% relative increase), while for Claude Sonnet 5, it increased from 22.44% to 36.22% (61.4% relative increase). A dependence-aware generalized estimating equation analysis estimated an odds ratio of 2.080 (95% robust CI [1.384, 3.127], p=4.264×10−4) for Persistent versus Independent conditions.