model selection, mixture of Gaussians

I have data and I want to decide whether it comes from 5-modal-normal distribution or 2-modal-normal distribution. In other words I want to check if it has 2 peaks or 5. I can estimate the $\mu$ and $\sigma$ of each Gaussian, but I don't know how to calculate the likelihood of each model. When I do, I would like to use the BIC criterion.

Normal distributions always have one mode, not 2 or 5. Presumably you mean to ask about how to calculate the likelihood of normal mixtures.

Since the density of a finite mixture is readily calculated from the densities of the components and the probability-weights on each component,

$$p(y_i|\underline{\mu},\underline{\sigma}^2,\underline{\pi}) = \sum_{j=1}^k \pi_i\,f(y_i|\mu_j,\sigma_j^2)\,,$$

if you have maximum likelihood (ML) estimates of the component means and standard deviations and component-weights, the likelihood of the mixture is straightforward, as is counting the parameters (there are normally $3k-1$ parameters for $k$ components - $2k$ for the mean and variance parameters by component and $k-1$ for the component weights); the likelihood is just

$$\prod_i p(y_i|\underline{\hat \mu},\underline{\hat \sigma}^2,\underline{\hat \pi})$$

Note that Steele and Raftery (2010)  says

For regular models, BIC is derived as an approximation to twice the log integrated likelihood using the Laplace method (Tierney and Kadane 1986), but the necessary regularity conditions do not hold for mixture models in general (Aitkin and Rubin 1985). However, Roeder and Wasserman (1997) showed that BIC leads to to a consistent estimator of the mixture density, and Keribin (2000) showed that BIC is consistent for choosing the number of components in a mixture model.

Indeed, it performs very well (see the same reference).

 Steele, R.J. and Raftery, A.E. (2010).
"Performance of Bayesian Model Selection Criteria for Gaussian Mixture Models."
In Frontiers of Statistical Decision Making and Bayesian Analysis
(M.-H. Chen et al eds), p 113-130,
New York: Springer
working paper version from 2009
{"ft_lang_label":"__label__en","ft_lang_prob":0.85793644,"math_prob":0.9874877,"size":2042,"snap":"2019-43-2019-47","text_gpt3_token_len":508,"char_repetition_ratio":0.12561335,"word_repetition_ratio":0.013114754,"special_character_ratio":0.25416258,"punctuation_ratio":0.10909091,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9963191,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-10-23T23:26:50Z\",\"WARC-Record-ID\":\"<urn:uuid:4ef766a4-3eae-4a8d-a446-5a4895a1a80a>\",\"Content-Length\":\"136575\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:6e9ff35c-03b2-4586-85d2-55f515e36a22>\",\"WARC-Concurrent-To\":\"<urn:uuid:1376bab2-b08b-40ca-9989-5ae9b79c9f1f>\",\"WARC-IP-Address\":\"151.101.193.69\",\"WARC-Target-URI\":\"https://stats.stackexchange.com/questions/261418/model-selection-mixture-of-gaussians\",\"WARC-Payload-Digest\":\"sha1:FTC4Q2DO5P5WF7ZFK5DU73PWDM2S5XSS\",\"WARC-Block-Digest\":\"sha1:YZT6TPUBKZOCW6HAYP4AATTXNF5OR7XN\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-43/CC-MAIN-2019-43_segments_1570987836368.96_warc_CC-MAIN-20191023225038-20191024012538-00307.warc.gz\"}"}