The Gemara (Sanhedrin 74a-b) rules that if ten Jews are present when a non-Jew threatens a Jew to perform any sin - even to dress like a non-Jew - on pain of death, the Jew is obligated to give up his life.
What if he’s not sure whether there are ten Jews present? Do we say that one is stringent on a Torah law, and so he must give up his life? Or do we say that one is stringent when it comes to life-and-death and he may not give up his life? Perhaps we would apply principles such as “follow the majority” or “kol kavuah” to settle it (or further complicate it)?
I do not ask according to Tosfos (AZ 28a), who rule that in any case one who gives up his life, even if he’s not obligated to, is praiseworthy. I ask only according to the Rambam (Hil. Yesodei HaTorah 5:1) that one is not allowed to give up his life if he’s not obligated to do so, and one who does is considered to have committed suicide.