Given a raw data sample, the purpose of this paper is to design a numerical procedure to model this sample under the form of polynomial chaos expansion. The coefficients of the polynomial are computed as the solution to a constrained optimization problem. The procedure is first validated on samples coming from a known distribution and it is then applied to raw experimental data of unknown distribution. Numerical experiments show that only five coefficients of the Chaos expansions are required to get an accurate representation of a sample.