How do you solve (1-p)^n <= 0.4? By taking the log with base 1-p, it would give n <= something, but intuitively this is wrong, as there should be a minimum value for n, not a maximum. Also, 0<=p<=1.
take the log using some other base
like base 10
it doesn't actually matter which base you use
Why does it not matter? I need a bound for n (i.e. n >= something)
well take the log of both sides, you get log((1-p)^n) <= log(0.4)
which is n * log(1-p) <= log(0.4) ==> log(1-p) <= log(0.4) / n
you can do the transformation no matter the base
or if you're solving for n, then it's n <= log(0.4) / log(1-p)
and that is true no matter if it's base 10 or base 100 or base 16 or base whatever
"or if you're solving for n, then it's n <= log(0.4) / log(1-p)" -> right, that's what I get
but that doesn't seem right
because there should be a minimum not a maximum for n
explain?
well the larger the n, the smaller (1-p)^n will be
well that expression, log(0.4)/log(1-p), may be negative, in which case you can just multiply the whole thing through by -1 which switches the <= to >=
wait actually, it will never be negative. log(0.4) is negative, and so is log(1-p) since p is between 0 and 1. Therefore it is positive as a whole...?
you haven't given me any context to answer this, why should there be any constraint on n at all? what is n?
n is just an integer, p is a probability (between 0 and 1). I want to find the smallest n such that (1-p)^n <= 0.4
so it's log(0.4) / log(1-p)
the <= vs >= is because the math doesn't "know" that you have a constraint on the values of P. for example if I'd said P was between 1 and infinity it might look right.
or rather, between -1 and negative infinity, i guess
Join our real-time social learning platform and learn together with your friends!