Secure multiparty computation (MPC) is a cryptographic technology in which a researcher can analyze of data while the data is kept encrypted. Although MPC can be used for researchers to securely perform statistical analysis in their own labs, a dedicated algorithm is required for the computation on encrypted data. In this work, we propose novel algorithms to perform linear regression and principal component analysis in MPC. We observe that some parts of these analyses can be computed from statistics, not individual records. Therefore, our algorithm computes statistics from individual records by using MPC, and obtain the final result from those statistics in the clear. We also investigate whether or not those statistics can be regarded as safe, and confirmed that the output using our algorithm is identical to the output in the clear by experiments.