William Cavendish , 4th Duke of Devonshire , KG , PC ( 1720-2 October 1764 ) was a British Whig statesman who was Prime Minister of Great Britain for a short period of time . William Cavendish , 4th Duke of Devonshire , KG , PC ( 8 May 1720 -- 2 October 1764 ) , styled Lord Cavendish before 1729 and Marquess of Hartington between 1729 and 1755 , was a British Whig statesman who was briefly titular Prime Minister of Great Britain . He was the first son of William Cavendish , 3rd Duke of Devonshire and Catherine Hoskins .