Journal of Automated Reasoning

, Volume 41, Issue 3–4, pp 295–323 | Cite as

Using Theorem Proving to Verify Expectation and Variance for Discrete Random Variables



Statistical quantities, such as expectation (mean) and variance, play a vital role in the present age probabilistic analysis. In this paper, we present some formalization of expectation theory that can be used to verify the expectation and variance characteristics of discrete random variables within the HOL theorem prover. The motivation behind this is the ability to perform error free probabilistic analysis, which in turn can be very useful for the performance and reliability analysis of systems used in safety-critical domains, such as space travel, medicine and military. We first present a formal definition of expectation of a function of a discrete random variable. Building upon this definition, we formalize the mathematical concept of variance and verify some classical properties of expectation and variance in HOL. We then utilize these formal definitions to verify the expectation and variance characteristics of the Geometric random variable. In order to demonstrate the practical effectiveness of the formalization presented in this paper, we also present the probabilistic analysis of the Coupon Collector’s problem in HOL.


Coupon collector’s problem Higher-order-logic HOL theorem prover Probabilistic analysis Probability theory Statistical properties 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Adler, I., Ahn, H., Karp, R.M., Ross, S.M.: Coalescing times for IID random variables with applications to population biology. Random Struct. Algorithms 23(2), 155–166 (2003)CrossRefMathSciNetMATHGoogle Scholar
  2. 2.
    Adler, M., Halperin, E., Karp, R.M., Vazirani, V.V.: A stochastic process on the hypercube with applications to peer-to-peer networks. In: Proc. 35th Annual ACM Symposium on Theory of Computing, pp. 575–584. ACM, New York (2003)Google Scholar
  3. 3.
    Audebaud, P., Paulin-Mohring, C.: Proofs of randomized algorithms in coq. In: Mathematics of Program Construction. LNCS, vol. 4014, pp 49–68. Springer, New York (2006)CrossRefGoogle Scholar
  4. 4.
    Bratley, P., Fox, B.L., Schrage, L.E.: A Guide to Simulation. Springer, New York (1987)Google Scholar
  5. 5.
    Baier, C., Haverkort, B., Hermanns, H., Katoen, J.P.: Model checking algorithms for continuous time markov chains. IEEE Trans. Softw. Eng. 29(4), 524–541 (2003)CrossRefGoogle Scholar
  6. 6.
    Bialas, J.: The σ-additive measure theory. J. Formaliz. Math. 2 (1990)Google Scholar
  7. 7.
    Billingsley, P.: Probability and Measure. Wiley, New York (1995)MATHGoogle Scholar
  8. 8.
    Celiku, O.: Quantitative temporal logic mechanized in HOL. In: Theoretical Aspects of Computing. LNCS, vol. 3722, pp. 439–453. Springer, New York (2005)Google Scholar
  9. 9.
    Clarke, E.M., Grumberg, O., Peled, D.A.: Model Checking. MIT, Cambridge (2000)Google Scholar
  10. 10.
    Church, A.: A formulation of the simple theory of types. J. Symb. Log. 5, 56–68 (1940)CrossRefMathSciNetMATHGoogle Scholar
  11. 11.
    DeGroot, M.: Probability and Statistics. Addison-Wesley, Reading (1989)Google Scholar
  12. 12.
    Devroye, L.: Non-Uniform Random Variate Generation. Springer, New York (1986)MATHGoogle Scholar
  13. 13.
    Dimitrov, N.B., Plaxton, C.G.: Optimal cover time for a graph-based coupon collector process. In: Automata, Languages and Programming. LNCS, vol. 3580, pp. 702–716. Springer, New York (2005)Google Scholar
  14. 14.
    Gordon, M.J.C., Melham, T.F.: Introduction to HOL: A Theorem Proving Environment for Higher-Order Logic. Cambridge University Press, Cambridge (1993)MATHGoogle Scholar
  15. 15.
    Grinstead, C.M., Snell, J.L.: Introduction to Probability. American Mathematical Society, Providence (1997)MATHGoogle Scholar
  16. 16.
    Harrison, J.: Theorem Proving with the Real Numbers. Springer, New York (1998)MATHGoogle Scholar
  17. 17.
    Hurd, J., McIver, A., Morgan, C.: Probabilistic Guarded Commands Mechanized in HOL. Theor. Comp. Sci. 346, 96–112 (2005)CrossRefMathSciNetMATHGoogle Scholar
  18. 18.
    Hasan, O., Tahar, S.: Formalization of the continuous probability distributions. In: Automated Deduction. LNAI, vol. 4603, pp. 3–18. Springer, New York (2007)Google Scholar
  19. 19.
    Hasan, O., Tahar, S.: Verification of expectation properties for discrete random variables in HOL. In: Theorem Proving in Higher-Order Logics. LNCS, vol. 4732, pp. 119–134. Springer, New York (2007)CrossRefGoogle Scholar
  20. 20.
    Hasan, O., Tahar, S.: Verification of probabilistic properties in HOL using the cumulative distribution function. In: Integrated Formal Methods. LNCS, vol. 4591, pp. 333–352. Springer, New York (2007)CrossRefGoogle Scholar
  21. 21.
    Hurd, J.: Formal verification of probabilistic algorithms. PhD Thesis, University of Cambridge, Cambridge (2002)Google Scholar
  22. 22.
    Khazanie, R.: Basic Probability Theory and Applications. Goodyear, Los Angeles (1976)Google Scholar
  23. 23.
    Kwiatkowska, M., Norman, G., Parker, D.: Quantitative Analysis with the Probabilistic Model Checker PRISM. Electron Notes Theor Comp Sci Elsevier 153(2), 5–31 (2005)CrossRefGoogle Scholar
  24. 24.
    Levine, A.: Theory of Probability. Addison-Wesley Series in Behavioral Science, Quantitative Methods. Addison-Wesley, Reading (1971)MATHGoogle Scholar
  25. 25.
    Leon Garcia, A., Widjaja, I.: Communication Networks: Fundamental Concepts and Key Architectures. McGraw-Hill, New York (2004)Google Scholar
  26. 26.
    Mao, W.: Modern Cryptography: Theory and Practice. Prentice Hall, Englewood Cliffs (2003)Google Scholar
  27. 27.
    Milner, R.: A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17, 348–375 (1977)CrossRefMathSciNetGoogle Scholar
  28. 28.
    Mitzenmacher, M., Upfal, E.: Probability and Computing. Cambridge University Press, Cambridge (2005)MATHGoogle Scholar
  29. 29.
    Nedzusiak, A.: σ-fields and Probability. J. Formaliz. Math. 1 (1989)Google Scholar
  30. 30.
    Paulson, L.C.: Isabelle: A Generic Theroem Prover, vol. 828 of LNCS. Springer, New York (1994)Google Scholar
  31. 31.
    Paulson, L.C.: ML for the Working Programmer. Cambridge University Press, Cambridge (1996)MATHGoogle Scholar
  32. 32.
    Richter, S.: Formalizing integration theory, with an application to probabilistic algorithms. Diploma Thesis, Technische Universitat Munchen, Department of Informatics, Germany (2003)Google Scholar
  33. 33.
    Rutten, J., Kwaiatkowska, M., Normal, G., Parker, D.: Mathematical Techniques for Analyzing Concurrent and Probabilisitc Systems, Volume 23 of CRM Monograph Series. American Mathematical Society, Providence (2004)Google Scholar
  34. 34.
    Stirzaker, D.: Elementary Probability. Cambridge University Press, Cambridge (2003)MATHGoogle Scholar
  35. 35.
    Sen, K., Viswanathan, M., Agha, G.: VESTA: a statistical model-checker and analyzer for probabilistic systems. In: Proc. IEEE International Conference on the Quantitative Evaluation of Systems, pp. 251–252. IEEE, Piscataway (2005)CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media B.V. 2008

Authors and Affiliations

  1. 1.Department of Electrical and Computer EngineeringConcordia UniversityMontrealCanada

Personalised recommendations