As probably many other people here, I learned integration, as an undergrad, from Rudin's books. I recently realized, however, that I don't quite use Lebesgue integration in my work, or at least I use it less and less. Nor in fact do I think any longer of Riemann integration as the intuitive definition of the integral. In fact, I tend to adhere more and more to the following point of view:
Question. What is the integral of a function $f$? And how to compute it?
Answer. Well, the integral is the average of $f$. So, if you want to compute it, pick some random values of $f$, as many as you can, and then make their average.
This point of view is of course not that heuristic: it's the guiding principle of the Monte Carlo method, an extremely powerful tool. However, and this is what I wanted to talk about, this Monte Carlo method is in fact something rather specialized, that you usually learn after Riemann and Lebesgue, and that is commonly regarded rather as a technical tool. But, is it really so?
More precisely, my questions would be as follows:
(1) Is it technically possible to introduce integration as a Monte Carlo integration (i.e. following the above question-answer), establish the main results etc. using this definition, and talk about Riemman, then maybe Lebesgue, only afterwards?
(2) If so, was this done somewhere? Ideally I'd be interested here in an undergrad-level textbook, doing (1), but I would be happy as well with a shorter text, basically outlining how to do (1) above, for people already into math etc.
[Note. Needless to say - in case some collegues of mine are reading this post :) - I'm not asking these questions as a preliminary to some weird teaching experiment. It's just that I'd be really interested, for research purposes, to have a completely new look at integration theory: and the first step here would be of course to seriously challenge what I learned long time ago, from Rudin's books.]
[Edit, Jan 14: Added two new tags, "logic" and "foundations", in view of an interesting suggestion by Timothy Chow. Of course, any new discussion or precise answer in either direction - positive or negative - would be very welcome.]