
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
Athletes A and B are playing a table tennis match with a best-of-five format, where the first player to win $3$ games wins the match. The outcomes of each game are independent of each other. The probability of A winning a game is $\frac{2}{3}$, and the probability of B winning a game is $\frac{1}{3}$.
$(1)$ Find the probability of A winning the match.
$(2)$ Let $X$ be the number of games needed to end the match. Find the probability distribution and the expected value of the random variable $X$.

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