Example of direct sampling