2) (10 pts) Write a GUI program as shown below. Implement the button click callback to plot the world population data (hw111.txt). Show the file path in the label next to the 'open' button. Use log scale for the y-axis. Add a radio button group to allow the user to change the curve color. At beginning, the curve should be plotted in red color.
Added by Tom-S M.
Close
Step 1
You can use GUIDE or App Designer for this. In your case, you need a GUI with a button, a label, a radio button group with three options (Red, Green, Blue), and an axes to plot the data. Here is a simple example of how you can create a GUI using GUIDE: Show more…
Show all steps
Your feedback will help us improve your experience
Adi S and 69 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Questions all refer the following graph of position of an object versus time Consider velocity and acceleration to be positive the same direction that is positive. (1pt. ) Find the averge velocity between the points on the graph labeled aud E. (Remember t0 include units!) 9. (1 pL.) Find the anstantanEous velocity the point labeled (1pC What i5 the instantaneous acceleration at the point O the graph Iaheled A? Pasitive Vegative Zero Impossible to tell (1 pL) What is the instAntaneous acceleration at the point Ou the gmph laheled D:
Madhur L.
The data that follow on the next page represent world population. An ecologist is interested in building a model that describes the world population. (a) Using a graphing utility, draw a scatter plot of the data using years since 2000 as the independent variable and population as the dependent variable. (b) Using a graphing utility, build a logistic model from the data. (c) Using a graphing utility, graph the function found in part (b) on the scatter plot. (d) Based on the function found in part (b), what is the carrying capacity of the world?represent world population. An ecologist is interested in building a model that describes the world population. (a) Using a graphing utility, draw a scatter plot of the data using years since 2000 as the independent variable and population as the dependent variable. (b) Using a graphing utility, build a logistic model from the data. (c) Using a graphing utility, graph the function found in part (b) on the scatter plot. (d) Based on the function found in part (b), what is the carrying capacity of the world? (e) Use the function found in part (b) to predict the population of the world in $2025 .$ (f) When will world population be 10 billion?
Exponential and Logarithmic Functions
Building Exponential, Logarithmic, and Logistic Models from Data
City planners believe that larger cities are populated by older residents. To investigate the relationship, data on population and median age in 10 large cities were collected. $$ \begin{array}{|lcc|} \hline \text { City } & \begin{array}{c} \text { City Population } \\ \text { (in millions) } \end{array} & \text { Median Age } \\ \hline \text { Chicago, IL } & 2.833 & 31.5 \\ \text { Dallas, TX } & 1.233 & 30.5 \\ \text { Houston, TX } & 2.144 & 30.9 \\ \text { Los Angeles, CA } & 3.849 & 31.6 \\ \text { New York, NY } & 8.214 & 34.2 \\ \text { Philadelphia, PA } & 1.448 & 34.2 \\ \text { Phoenix, AZ } & 1.513 & 30.7 \\ \text { San Antonio, TX } & 1.297 & 31.7 \\ \text { San Diego, CA } & 1.257 & 32.5 \\ \text { San Jose, CA } & 0.930 & 32.6 \\ \hline \end{array} $$ a. Plot these data on a scatter diagram with median age as the dependent variable. b. Find the correlation coefficient. c. A regression analysis was performed and the resulting regression equation is Median Age $=31.4+0.272$ Population. Interpret the meaning of the slope. d. Estimate the median age for a city of 2.5 million people. e. Here is a portion of the regression software output. What does it tell you? Predictor $\quad$ Coef $S E$ Coef $\quad T \quad$ P $\begin{array}{lllll}\text { Constant } & 31.3672 & 0.6158 & 50.94 & 0.000\end{array}$ Popul ation $\begin{array}{llll}0.2722 & 0.1901 & 1.43 & 0.190\end{array}$ f. Using the .10 significance level, test the significance of the slope. Interpret the result. Is there a significant relationship between the two variables?
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD