standard_description: Construct and interpret two-way frequency tables of data when two categories are associated with each object being classified. Use the two-way table as a sample space to decide if events are independent and to approximate conditional probabilities. For example, collect data from a random sample of students in your school on their favorite subject among math, science, and English. Estimate the probability that a randomly selected student from your school will favor science given that the student is in tenth grade. Do the same for other subjects and compare the results.
problem_activity: Task
Many computer applications use very complex mathematical algorithms. The faster the algorithm, the more smoothly the programs run. The running time of an algorithm depends on the total number of steps needed to complete the algorithm. For image processing, the running time of an algorithm increases as the size of the image increases.
For an $n$-by-$n$ image, algorithm 1 has running time given by $p(n) = n^3+3n+1$ and algorithm 2 has running time given by $q(n)=15n^2+5n+4$ (measured in nanoseconds, or $10^{-9}$ seconds ).
Compute the running time for both algorithms for images of size 10-by-10 pixels and 100-by-100 pixels.
Graph both running time polynomials in an appropriate window (or several windows if necessary).
Which algorithm is more efficient?


aligns: no