A coin of random bias, then twenty flips
A coin is manufactured so that its probability of heads, , is a random number spread evenly between and (uniform on ). Once is fixed, you flip that coin times.
How many heads should you expect? As a follow-up, what if is instead spread evenly between and ?