
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
A certain high school encourages students to spontaneously organize various sports competitions. Two students, A and B, play table tennis matches in their spare time. The competition adopts a "best of seven games" format (i.e., the first player to win four games wins the match and the competition ends). Assuming that the probability of A winning each game is $\frac{1}{3}$. <br/>$(1)$ Find the probability that exactly $5$ games are played when the match ends; <br/>$(2)$ If A leads with a score of $3:1$, let $X$ represent the number of games needed to finish the match. Find the probability distribution and expectation of $X$.

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