sigma algebra and corresponding random variable We know that for a probability space $(X,F,\mu)$, if X is a random variable, then $\sigma(X)$ is a subset of F. 
But my question is given a sigma algebra $\tilde{F} \subset F$, can we find a r.v X, s.t. $\sigma(X) = \tilde{F}$  ? if it's not true always, under what conditions it's true?
 A: Here is an example when it's not true:
Let $X=\mathbb{R}$,$\mathcal{F} = 2^{\mathbb{R}}$ and $\mu = \delta_0$. Then for any r.v. $Z$, the sigma algebra $\sigma(Z)$ is generated by sets as $Z^{-1}([a,b])$ where $a, b$ can be finite or infinite. It is well known that this sigma algebra has cardinality of the continuum, so it can't be equal to $2^{\mathbb{R}}.$ Take $\tilde{\mathcal{F}} = \mathcal{F}$,then we can' find a r.v. $Z$ such that $\sigma(Z) = \tilde{\mathcal{F}}$.
A: Notice that if $X$ is a random variable, then 
$\sigma(X)=\sigma(X^{-1}((a,b)), a,b\in\mathbb Q)$, hence $\sigma(X)$ is countably generated, that is, there is a collection of sets $(A_i)_{i\in\mathbb N}$ such that $\sigma(X)=\sigma(A_i,i\in\mathbb N)$.
Conversely, if $\mathcal F'$ is a countably generated $\sigma$-algebra, say by $(A_i)_{i\in\mathbb N}$, then define 
$$X:=\sum_{i\in\mathbb N}3^{-i}\chi(A_i).$$
We have $\sigma(A_i)=\sigma(X)$.
The answer by Petite Etincelle gives an example of $\sigma$-algebra which is not countably generated.
