A robust optimization formulates the uncertainties of a physical system into the objective functions and/or its constraints, and uncertainties are consequently quantified at the same time as minimizing the objectives, which therefore provides a robust solution to the corresponding physical system. In this paper, we present a general mathematical framework for data-driven robust optimization problems: first, the Gaussian Process Regression (GPR) method is used to create a surrogate model, which allows us to analyze and quantify uncontrollable uncertainties such as noise from the training dataset or finite/limited discrete data points; then, the Polynomial Chaos Expansion (PCE) method is used to propagate controllable uncertainties, such as a manufacturing tolerance, from the input to the output and create a probabilistic model; finally, three robust optimization problems are formulated and solved with a detailed analysis of the results. The proposed optimization framework is implemented in open-source Python libraries and assessed by validated dataset from a Polymerase Chain Reaction (PCR) thermal flow system with consideration of uncertainties from manufacturing process.