The balloon expulsion test is a diagnostic procedure used to assess anorectal function by measuring the ability to expel a water-filled balloon from the rectum. It is commonly used to evaluate conditions like constipation and pelvic floor dysfunction, helping to identify defecatory disorders such as dyssynergic defecation.