Chengwei LEI, Ph.D.    Associate Professor

Department of Computer and Electrical Engineering and Computer Science
California State University, Bakersfield

 

Math VS Computer



There is a star. From next year (year 1) the star explosion probablity is 1%, after that, every year will increase 1%
( 2nd year is 2%, 3rd year is 3%, 4th year is 4% ...)

Which year is the highest probablity to explosion?

Year 100? 100%? No!~~~
P(100)=99%*98%*97%......1%*100%

 

P(n)=99%*98%*97%......[100-(n-1)]%*n%=99*98*97...(100-n+1)*n/(100^n)
derivative of n! ?

P(n+1)/P(n)=(100-n)(n+1)/(100*n)
try to find when >1

N=9
which means P(10)/P(9)>1, and P(11)/p(10)<1

So, 10th year is the answer
P=6.28%

 



 

How many steps for Fib number?

1.618^n




 

Solve Linear Regression


 

Am I dying ?:

  • There is a rare deadly disease is present in the population at 1 in 100,000
  • A test for this disease will report positive for 99.5% of people with disease, and negative 99.9% of time for those without.
  • One day, I took this test, and got a Postivite result. Am I dying?

Bayes Disease