A blindfolded contestant makes a random selection from a bag that contains​ white, red,​ green, and yellow marbles at a carnival booth. The bag contains 12 marbles in total. Use the accompanying clues to determine how many marbles of each color are in the bag.

Let:

- x = number of white marbles
- y = number of red marbles
- z = number of green marbles
- w = number of yellow marbles

From the clues:
1. x + y + z + w = 12 (total number of marbles is 12)
2. x = y + 2 (there are 2 more red marbles than white marbles)
3. w = 2z (there are twice as many yellow marbles as green marbles)

Substitute the second and third clues into the first equation:
(y + 2) + y + z + 2z = 12
2y + 3z = 10
2y = 10 - 3z
y = 5 - 1.5z

Now substitute y into the second equation:
x = 5 - 1.5z + 2
x = 7 - 1.5z

Now substitute z into the third equation:
w = 2(7 - 1.5z)
w = 14 - 3z

Since the total number of marbles is 12, we can set up the equation:
x + y + z + w = 12
(7 - 1.5z) + (5 - 1.5z) + z + (14 - 3z) = 12
26 - 7z = 12
7z = 14
z = 2

Substitute z back into the equations to find the numbers of each color of marble:
x = 7 - 1.5(2) = 4
y = 5 - 1.5(2) = 2
w = 14 - 3(2) = 8

Therefore, there are 4 white marbles, 2 red marbles, 2 green marbles, and 8 yellow marbles in the bag.