A 47-year-old woman has developed bleeding between otherwise irregular periods over the past four months. She has a body mass index of 36 kg/m² and polycystic ovary syndrome; examination shows no pelvic mass or cervical lesion, and pregnancy has already been excluded. Which one of the following is the most appropriate initial investigation?