[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-267880-105":59,"doc-detail-267880-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","ds-100-practice-final-questions-fall-2017","DS-100 Practice Final Questions - Fall 2017","","Practice final exam questions for DS-100 covering two main areas: loss minimization and parameter estimation under exponential-growth and exponential-distribution models, and data wrangling with SQL. The loss section includes deriving regularized least-squares losses, solving for optimal parameters, differentiating log-likelihood based objectives, and formulating gradient-descent updates. The SQL section provides a media-store schema, view modification and selection questions, query selection for statistical thresholds, and SQL sampling analysis with expected sample sizes and bias considerations.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":20,"@type":76,"position":81},"https://docshare.wps.com/document/exam/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/ds-100-practice-final-questions-fall-2017/267880/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/ds-100-practice-final-questions-fall-2017/267880.png","ImageObject",300,407,{"name":92,"@type":93},"Asher","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-21","2026-09-14",true,{"@type":102,"interactionType":103,"userInteractionCount":39},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"How do you write the L2-regularized least-squares loss for the exponential growth model log(yi)=−xi?","Question",{"text":112,"@type":113},"Use the squared error between log(yi) and the model prediction xi with an added λ-parameter L2 penalty on the growth-rate parameter, then sum over all observations.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What parameter value minimizes the given log-likelihood loss for the exponential distribution model f_θ(x)=θe^{−θx}?",{"text":117,"@type":113},"Set the derivative of the provided loss with respect to θ to zero and solve, then select the option that matches the minimizing θ.",{"name":119,"@type":110,"acceptedAnswer":120},"For SQL sampling, what is the expected number of rows returned by TABLESAMPLE Bernoulli(0.0001) on a 30 million-row table, and how does that compare to using LIMIT?",{"text":121,"@type":113},"The expected rows equal 30,000,000×0.0001. LIMIT returns the first XX rows, which may be biased but can run quickly; it also may overwhelm local memory if XX is large.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},267880,1789971408,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":19,"category_name":20,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":39,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":145},687197207639,"https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd","DS-100 Practice Final Questions  \nFall 2017  \nName:    \nEmail address:    \nStudent id:    \nInstructions:  \n􀀏 These are a random selection of previous ﬁnal exam questions.  \n􀀏 This is not representative of the length of the ﬁnal (its too long!) .  \n􀀏 You may use a single page (two-sided) cheat sheet.  \n1 Loss Minimization  \n1. In a petri dish, yeast populations grow exponentially over time. In order to estimate the growth rate of a certain yeast, you place yeast cells in each of n petri dishes and observe the population yi at time xi and collect a dataset f(x1 ; y 1 ) ; : : : ; (xn ; yn)g. Because yeast populations are known to grow exponentially, you propose the following model:  \nlog(yi ) = 􀀍xi (1)  \nwhere 􀀍 is the growth rate parameter (which you are trying to estimate) . We would like to derive the L2 regularized estimator least squares estimator.  \n(1) [4 Pts.] Write the regularized least squares loss function for 􀀍 under this model. Use 􀀕 asthe regularization parameter.  \n(2) [8 Pts.] Solve for the optimal 􀀍 as a function of the data and 􀀕  \n2. Suppose we observe a dataset fx1 ; : : : ; xn g of independent and identically distributed samples from the exponential distribution. Suppose we give you a ”probability model” parameterized by 􀀕 :  \nf􀀕 (x) = 􀀕e 􀀀􀀕x  \nthat estimates the probability of a particular data point. In addition we give you the “loglikelihood” loss function as the following:  \nn  \nL (􀀕) = 􀀀n log (􀀕) + 􀀕 X xi (10)  \ni=1  \nDerive the parameter value 􀀕 that minimizes this loss function. Circle your answer.  \n3. Suppose we collect a dataset of n observations fx1 ; : : : ; xng which we believe are drawn from a distribution with the following PDF:  \nf􀀖 (x) = C exp 􀀒 􀀀 ~~ ~~(x~~ ~~~~ ~~􀀖)6 􀀓 (18)  \nwhere C is a constant that does not depend on 􀀖 . As before we are given the loss function:  \nL (􀀖) = 􀀀nlog C + 16 Xi1 (xi 􀀀 􀀖)6 (19)  \n(1) [4 Pts.] Compute the derivative of the derivative of the loss with respect to 􀀖 .  \n(2) [3 Pts.] Because there is no closed form solution for 􀀖 in ~~@~~@􀀖L (􀀖) = 0, we would likely use gradient descent to approximately compute 􀀖^ . Given the gradient function:  \n @   \ng (􀀖) = log L(􀀖) (23)  \n@􀀖 ;  \nand a step size 􀀚(t), what is the gradient descent update rule to go from 􀀖 (t) to 􀀖 (t+1)?(Hint: your answer should contain only the variables g (􀀖(t)), 􀀖 (t), 􀀖 (t+1), and 􀀚(t).)  \n2 Wrangling and Querying Data  \n2.1 SQL  \nFor the questions in this subsection, assume we have a massive database in the cloud with the following schema:  \n- - A simple digital media store database  \nCREATE TABLE media  \n(mid integer PRIMARY KEY ,  \nname text, type char , year_released integer, length integer , buy_cost float, rent_cost float , avg_rating float);  \nCREATE TABLE customers  \n(cid integer PRIMARY KEY ,  \nname text, joined date, nation_id integer ,  \nactivity_level integer);  \nCREATE TABLE transactions  \n(tid integer PRIMARY KEY ,  \ntdate date, item integer, customer integer ,  \nrent_or_buy integer, price_paid float, percent_viewed float , FOREIGN KEY (item) REFERENCES media,  \nFOREIGN KEY (customer) REFERENCES customers);  \nCREATE VIEW stats AS  \nSELECT min (length) AS len_min, max (length) AS len_max, avg (length) AS len_mu, stddev (length) AS len_sigma, min (avg_rating) AS ar_min, max (avg_rating) AS ar_max, avg(avg_rating) AS ar_mu, stddev(avg_rating) AS ar_sigma  \nFROM media;  \n4. [4 Pts.] In the media table above, the type column encodes the type of media as a unique character code (e.g., 'S' for song, 'M' for movie, 'E' for episode, etc.) . Suppose we wanted to modify the stats view to display the stats for each type of media. Which of the following are true? (Select all that apply.)  \nA. We need to change the granularity of the view to be ﬁner than it is above.  \nB. We need to add a GROUP BY type clause to the view.  \nC. It would be helpful to add media .type to the list of columns in the SELECT clause of the view.  \nD. The modiﬁed view should have more rows than the original view above. ","cbCailEZoMwj6jrV","https://ap.wps.com/l/cbCailEZoMwj6jrV","pdf",1523360,34,"English","# Loss Minimization\n## Exponential growth model and L2-regularized least squares\n## Exponential distribution log-likelihood minimization\n## PDF with unknown parameter and gradient descent update\n# Wrangling and Querying Data\n## SQL: schema, views, and query selection\n## SQL Sampling: TABLESAMPLE vs LIMIT and expectation","[{\"question\":\"How do you write the L2-regularized least-squares loss for the exponential growth model log(yi)=−xi?\",\"answer\":\"Use the squared error between log(yi) and the model prediction xi with an added λ-parameter L2 penalty on the growth-rate parameter, then sum over all observations.\"},{\"question\":\"What parameter value minimizes the given log-likelihood loss for the exponential distribution model f_θ(x)=θe^{−θx}?\",\"answer\":\"Set the derivative of the provided loss with respect to θ to zero and solve, then select the option that matches the minimizing θ.\"},{\"question\":\"For SQL sampling, what is the expected number of rows returned by TABLESAMPLE Bernoulli(0.0001) on a 30 million-row table, and how does that compare to using LIMIT?\",\"answer\":\"The expected rows equal 30,000,000×0.0001. LIMIT returns the first XX rows, which may be biased but can run quickly; it also may overwhelm local memory if XX is large.\"}]","DS-100 Practice Final Questions - Fall 2017 | PDF",1789426008,86]