Answer: There are 15 ghosts in a haunted house.
Step-by-step explanation:
Since we have given that
Total number of ghosts, goblins and ghouls = 51
On Friday,
Let the number of goblins be x
Let the number of ghosts be

Let the number of ghouls be

On Saturday,
Two-thirds of the ghouls each became a ghost,
So, it becomes

Now, number of ghost becomes

and number of ghouls becomes

On Sunday,
Number of ghosts each became a goblin = 11
So, Number of goblins becomes

Now, according to question , we have a ratio of ghouls to goblins i.e. 1:3
So, it becomes,

So, number of ghosts is given by

So, there are 15 ghosts in a haunted house.