The Bernoulli random variable has a probability function: $$f_X(x) = p^x\,(1-p)^{1-x}~\mathbf 1_{x\in\{0,1\}}\\ f_X(0)=1-p\\ f_X(1)=p\qquad$$
Provide an example of a Bernoulli experiment and a Bernoulli random variable.
$$f_X(0)=1-p $$ $$f_X(1) = p $$ If I take a coin toss for an example how should I mathematically notate the experiment?
Thanks
You have the correct expressions for the pmf at those arguments.
$X\sim\mathcal{Ber}(p)$ is a typical notation indicating that random variable $X$ follows a Bernoulli distribution. That is that: $X$ is the indicator of success in a single succeed or fail trial, which has the given expected rate for success, $p$. Some authors may use "$\mathcal{Bern}$", "$\mathcal{Bernoulli}$", or simply "$\mathcal{B}$".
Where $f_X()$ is the probability mass function for $X$, then:
$$X\sim\mathcal{Ber}(p) ~\iff~ f_X(x) = p^x\,(1-p)^{1-x}~\mathbf 1_{x\in\{0,1\}}\\ f_X(0)=1-p\\ f_X(1)=p\qquad$$
For a single coin toss, you will also need to indicate what are you counting as a success, and what value is the success rate, $p$. Some of this has to be done with words. In short: