Answer :

Given the data in the image, the data can be gotten using the general rule for stem and leaf which states that: A stem and leaf is a table used to display data. The 'stem' is on the left displays the first digit or digits. The 'leaf' is on the right and displays the last digit. For example, 543 and 548 can be displayed together on a stem and leaf as 54 | 3,8.

Step 1: Using the explanation above, our data can be written out as below:

[tex]8,9,9,11,11,12,16,20,20,2x,30,31[/tex]

Step 2: Write out the formula for the interquartile range which equals 12.

[tex]\begin{gathered} \text{IQR}=Q3-Q1 \\ \text{where Q3 equals the median of the half of the data to the right} \\ \text{and Q1 equals the median of the half of the data to the left} \\ To\text{ get Q3:} \\ (16,20,20,2x,30,31)_{} \\ \operatorname{median}=\frac{20+2x}{2} \\ To\text{ get Q1:} \\ (8,9,9,11,11,12) \\ \operatorname{median}=\frac{9+11}{2}=\frac{20}{2}=10 \end{gathered}[/tex]

Step 3: We equate the formula for interquartile range to 12, we let 2x=y to ease the solution steps:

[tex]\begin{gathered} Q3-Q1=\text{IQR} \\ \frac{20+y}{2}-10=12 \\ multiply\text{ through by 2} \\ 20+y-2(10)=2(12) \\ 20+y-20=24 \\ y=24 \end{gathered}[/tex]

Step 4: Recall that 2x=y, this means 2 and a number =y. We then equate the number 2x to y since we have gotten the value for y. This means;

[tex]\begin{gathered} 2x=y=24 \\ x=4 \end{gathered}[/tex]

Hence, the value for x is 4.