Therefore, you can compute the consumer surplus at a price p as long as you know the demand function, as long as you can observe it from the data even if you don't know anything about the utility function. 