
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
On November 18, 2023, the World Athletics Elite Label Event - the 2023 Xichang Qionghai Wetland Marathon - started in Xichang City, Liangshan Prefecture. More than 21,191 participants from over 10 countries and regions including China, France, the UK, Poland, Ethiopia, Kenya, and South Korea took part in the race. The event, themed "Running in Beautiful Xichang, Chasing Dreams in Colorful Liangshan," featured three categories: the marathon for men and women, the half marathon for men and women, and the mini health run. Students from a certain school's extracurricular track and field interest group signed up for the half marathon and mini health run categories, with all students participating in the race and each student choosing only one category. The number of participants is shown in the table below:

|            | Half Marathon | Mini Health Run |
|------------|---------------|-----------------|
| Male       | 20            | 10              |
| Female     | a             | 10              |

If 5 students are randomly selected from this interest group using stratified sampling, with 3 male students and 2 female students, find:
$(1)$ the value of $a$ and the probability that a student from this interest group chooses the half marathon category;
$(2)$ whether there is a 90% confidence that a student's choice of race category is related to their gender.

Critical value table:
| $P(K^{2}\geqslant k)$ | 0.10 | 0.010 | 0.001 |
|-----------------------|------|-------|-------|
| $k$                   | 2.706| 6.635 | 10.828|

Reference formula: ${K}^{2}=\frac{n(ad-bc)^{2}}{(a+b)(c+d)(a+c)(b+d)}$.

Present the answer in LaTex format: \boxed{Your answer}
user