Domain Modelling - $!.! / "$! #! #" % %! "! &' &# " ( & ) #( % ) ( "# $! closer to the user. Modelling. Transformation. At the end: SQLknowledge
|
|
- Sabina Harvey
- 5 years ago
- Views:
Transcription
1 nr B1 B2 wk ma do SQL (1) SQL (2) Thema Casus Opstellen datamodel B Data transformatie B4 B SQL (3) Toets B Mapping/constraints/SQL "# "$ # #" % % " &' &# " ( & ) #( % ) ( "# $ "# closer to the user Modelling At the end: SQLknowledge required more technical Transformation In general: a relational database is a database that is perceived by its users as a collection of tables (and nothing but tables). (from: C.J. Date; An Introduction to Database Systems) - $. / Players Plnr Playername Street Town Teamname A very simple relational database structure (a sportsclub): 1 K. Huisman Annastraat 24 Nijmegen Heren 2 P.J. van Onderen Willemstraat 13 Nijmegen Dames Fines P. van Oosterom Past. Pietstraat 14 Weurt 4 Heren 6 Heren W. De Bom Huilstraat 67 Wychen 8 Date Dames Finenr F.G. Habank Playernr Vossendijk Amount 288 Nijmegen Teams H. Flits Zwanenveld Nijmegen 9 Jeugd1 10 Jeugd1 L. Willemsen Kasteel 4 Wychen Class 1 12/8/89 Captain Teamname M.E.P. Graag Broerdijk 234 Nijmegen 12 Heren 2 12/8/89 H. Nijboer 12 Plein Arnhem 13 Dames 13 Jeugd1 13/8/89 K. 10 De 34 Huilstraat Groot Wychen 19 Jeugd2 20 Jeugd2 34 Jeugd2 13/8/89 B.E. 20 Melmans 28 Kasteel Wychen W. De Bom Huilstraat 67 Wychen 23 Jeugd1 19/8/89 Dames Annastraat 24 T. Huisman Nijmegen 24 Jeugd1 16 Heren 20/8/ H. Fluit Snelweg 673 Lent 25 Dames 7 20/8/ Wolvendijk 123 W.Jansen Elst 28 Jeugd /8/2003 D. van 12 De Agt Beurs Groesbeek Jeugd /9/2003 K. Zwartjes 12 Past. Weurt Pietstraat Jeugd1 33 Heren J. Mienen Ekkersrijt 23 Eindhoven 34 Jeugd2 H. Blaak Ekkersrijt 28 Eindhoven 36 Dames D.F. Janssen Groenstraat 45 Oss 42 R. Heymans Dreef 24 Grave Jeugd1 44 P. van Oss Dreef 24 Oss Jeugd1 1
2 table "# $ %&& For instance: about the President -table: column row field value data types: char smallint varchar decimal ( m n ). 0 1 ' ( %% ' % (% ( 3 4 ' ( " " ' () "6"( "78 " 9' : " ; ( " # &1%&2&22 < = > ""$? % > ' " > ")) > -? :" ) " ( ";A )# > % ( A ) # 2 5 ' ( ##(# $ (#( B > - > 4 " %) % ' ' '' > B% % % ' :': > B( " ' B ' B > B % ) DDL ( data definition ) CREATE tables indexes views Establish primary / foreign keys DROP / ALTER tables etc. DML ( data manipulation ) INSERT / UPDATE / DELETE SELECT... etc. DCL ( data control ) COMMIT / ROLLBACK work GRANT / REVOKE etc. Physical Design Implementation Maintenance 2
3 ' ( % -.(/ only what we want to have/see is the part that has to be specified and not how it has to be done. only the desired results must be indicated Multiple-element-at-a-time-processing Example: SELECT playername teamname FROM players WHERE town = Nijmegen AND playernr NOT IN (SELECT playernr FROM fines WHERE amount > 25) ( C ( B@@B SELECT List the columns (and expressions) that should be returned from the query FROM Indicate the table(s) or view(s) from which data will be obtained WHERE Indicate the conditions under which a row will be included in the result GROUP BY Indicate categorization of results HAVING Indicate the conditions under which a category (group) will be included ORDER BY Sorts the result according to specified criteria Attention: This is the order in which (maybe) the SQL-query is processed by the RDMS. It is not the order in which we analyse the information demand and construct such SQL-query ' (' % SELECT FROM WHERE [DISTINCT] target-list relation-list qualification & - & - & ( & B % D%E%F%DF%EF%DE%G %###G C %# -G '%H 9G H # ' G B " % #' 6-8 I % % ( " ) " & B & &# & ' "(# & ' &# & ' G B % # = " "I H A # 0 1 3
4 0 %1 % J) > ##% > ##%KLM# > )) # "# > 9E1 NN FN O -G '%H 9G H )N G C )?# > ' G C )G H G C ## > O &) % # > ##%O M) # ' NNN " I > G Q # 2 ) SELECT column-name or list-of-column-names or FROM table-name [ WHERE search-condition ] [ ORDER BY clause] Example: SELECT FROM WHERE pres_name birth_yr death_age state_born president state_born = 'New York' PRES_NAME BIRTH_YR DEATH_AGE STATE_BORN Van Buren M New York Fillmore M New York Roosevelt T New York Roosevelt F D New York.O 9@/& I Comparison operators: = equal to <> not equal to (or NOT = ) > greater than >= greater than or equal to < less than <= less than or equal to Also:... IS NULL or... IS NOT NULL IN ( list-of-possible-values ) (or: = ANY...) BETWEEN... AND... LIKE..... string ; wild cards: % _ or... Combination of conditions linked by logical operators AND OR NOT $O 9@& WHERE STATE_BORN = 'Texas' WHERE YRS_SERV >= 7 OR PARTY = 'Democratic' WHERE PARTY = 'Republican AND NOT STATE_BORN = 'Texas' WHERE YRS_SERV = 12 AND DEATH_AGE IS NOT NULL WHERE STATE_BORN IN ( 'Texas' 'California' 'Georgia ) WHERE DEATH_AGE BETWEEN 60 AND 70 ( limits included ) WHERE PRES_NAME LIKE '_e% AND PRES_NAME NOT LIKE 'R%' 4
5 H ) & " The following expression can have several different meanings depending on the position of parentheses: NOT YRS_ SERV 10 > DEATH_AGE AND DEATH_AGE > 60 BIRTH_YR / 100 One can introduce parentheses to this expression without affecting its meaning: ( NOT (YRS_SERV 10 > DEATH_AGE ) ) AND ( DEATH_AGE > (60 BIRTH_YR / 100 ) ) However the meaning of the expression is changed by repositioning the parentheses: NOT ( ( YRS_SERV 10 > DEATH_ AGE ) AND ( DEATH_AGE > 60 BIRTH_YR /100 ) ) => If you have any doubt about operator precedence: use parentheses ) "#" 2###< - 3 4#/ If used then only at the end of a query (the last clause); it is just the way to present the encountered results from the SELECT / FROM / WHERE-combination; Example: SELECT FROM president WHERE state_born IN ( 'Ohio' 'New York ) ORDER BY birth_yr More arguments can be mencioned for the ordering way: SELECT pres_name birth_yr death_age state_born WHERE death_age BETWEEN 60 AND 70 AND state_born IN ('Ohio' 'New York') ORDER BY state_born birth_yr DESC Ordering option ASC is default PRES_NAME BIRTH_YR DEATH_AGE STATE_BORN Roosevelt F D New York Roosevelt T New York Harrison B Ohio Hayes R B Ohio Grant U S Ohio 0 " #$" % $"& M ( 5%6 M Aggregate functions: AVG SUM MIN MAX COUNT Examples: SELECT COUNT ( ) SUM ( NR_CHILDREN ) FROM PRES_MARRIAGE WHERE mar_year BETWEEN 1800 AND 1840 COUNT () or : COUNT ( column-name ) MIN (... ) MAX (... ) on alpha-numeric (column-) values SUM (... ) AVG (... ) on numeric (column-) values SELECT COUNT ( ) MIN ( death_age ) AVG (death_age) WHERE death_age IS NOT NULL AND state_born = 'Ohio Warning: it is not allowed to mix in the SELECT-clause column-name(s) and statistical functions (... at least: if there is no additional GROUPING-clause...). So: SELECT pres_name AVG ( birth_yr ) <= NOT ALLOWED (why not allowed?) Explanation: - the syntax doesn t allow so ; - more important: such mix cannot have any real meaning 2 5 5
6 =?K Possible problems: rounding off truncation and NULL-values SELECT SUM(death_age) / COUNT() AVG(death_age) Operators: DISTINCT... (shows each (combined) value only once...) (default: ALL...) F_1 AVG DOUBLE PRECISION SMALLINT Further SELECT-clause -operators and -functions: depending on data-type and RDBMS Example: SELECT FROM WHERE SUM(death_age) / COUNT() AVG(death_age) president death_age IS NOT NULL SELECT pres_name birth_yr death_age WHERE birth_yr IS NOT NULL AND birth_yr death_age > 1950 F_1 AVG DOUBLE PRECISION SMALLINT ' : ##.# /& &"$.& / " ' (. % ("' Partitioning rows into groups with the same value for column a. Basic syntax: select group-property1... from... [ where row-criterion(s) ] group by group-criterion1... Example: select sex count () avg ( iq ) from Pupils where iq is not null group by sex R J -. %7 38 7/ R K M SELECT < group-properties properties to be shown > FROM table-name [ WHERE <condition on rows > ] GROUP BY < way of grouping > HAVING < conditions on groups > ] [ ORDER BY clause].") 9 :26 SELECT state_born COUNT() WHERE death_age >= 80 GROUP BY state_born SELECT party COUNT() WHERE state_born <> 'New York' GROUP BY party HAVING COUNT() > 2 ORDER BY 2 DESC STATE_BORN COUNT Iowa 1 Massachusetts 2 Missouri 1 Virginia 2 PARTY COUNT Republican 15 Democratic 11 Demo-Rep 4 Whig K M BH C G?C:?:G?:-S?-T R Always look out what can be meaningful grouping possibilities in a given table. 6
7 .") 9 :26 -;/ SELECT pres_name COUNT () FROM pres_hobby GROUP BY pres_name HAVING COUNT () > 4 SELECT hobby COUNT () FROM pres_hobby WHERE pres_name NOT LIKE 'Wash%' GROUP BY hobby HAVING COUNT() > 4 ORDER BY 2 PRES_NAME COUNT Coolidge C 5 Eisenhower D D 5 Roosevelt T 7 HOBBY COUNT Walking 5 Golf 6 Fishing 8 Riding 10 PRES_NAME COUNT SUM SELECT pres_name COUNT () SUM(nr_children) Harrison W H 1 10 Tyler J 2 15 FROM pres_marriage Reagan R 2 4 GROUP BY pres_name Fillmore M 2 2 HAVING COUNT()>= 2 OR SUM(nr_children)>8 Harrison B 2 3 ORDER BY 2 Wilson W 2 3 Roosevelt T $ ) ' ( %% ' % (% 5 &< " 6?8 &) 6###8 ;&%=% " &) 6 &###8 2 < B B $ K M X - Ł " K M ) " K M# Ł &4&( " M K) "M# Q ) R "$ 4 SELECT < the properties to be shown > FROM table1 table2.... WHERE < join - criterion > [ AND <search - condition > ] ### ) " ### $ P_TABLE PRES_NAME BIRTH_YR Buchanan J 1791 Harrison B 1833 Nixon R M 1913 Reagan R 1911 M_TABLE PRES_NAME SPOUSE_NAME Harrison B Scott C L Harrison B Dimmick M S L Nixon R M Ryan T C Reagan R Wyman J Reagan R Davis N Q 4& ->?% / If you try: PRES_NAME BIRTH_YR PRES_NAME1 SPOUSE_NAME SELECT Buchanan J 1791 Harrison B Scott C L Buchanan J 1791 Harrison B Dimmick M S L FROM P_table M_table Buchanan J 1791 Nixon R M Ryan T C Buchanan J 1791 Reagan R Wyman J Buchanan J 1791 Reagan R Davis N Ł Harrison B 1833 Harrison B Scott C L Harrison B 1833 Harrison B Dimmick M S L Harrison B 1833 Nixon R M Ryan T C Harrison B 1833 Reagan R Wyman J Harrison B 1833 Reagan R Davis N Nixon R M 1913 Harrison B Scott C L Nixon R M 1913 Harrison B Dimmick M S L ##O I Nixon R M 1913 Nixon R M Ryan T C Nixon R M 1913 Reagan R Wyman J Nixon R M 1913 Reagan R Davis N Reagan R 1911 Harrison B Scott C L Question: how can Reagan R 1911 Harrison B Dimmick M S L Reagan R 1911 Nixon R M Ryan T C we get a useful result? Reagan R 1911 Reagan R Wyman J Reagan R 1911 Reagan R Davis N 7
8 @ " Join-criterionŁ 9 SELECT P_table.pres_name birth_yr spouse_name FROM P_table M_table WHERE P_table.pres_name = M_table.pres_name PRES_NAME BIRTH_YR SPOUSE_NAME Harrison B 1833 Scott C L Harrison B 1833 Dimmick M S L Nixon R M 1913 Ryan T C Reagan R 1911 Wyman J Reagan R 1911 Davis N % % & ) ( " KM )) SELECT P.pres_name birth_yr spouse_name FROM P_table P M_table M WHERE P.pres_name = M.pres_name - 4& Example: show the names of the presidents born in the 20th century. Show also their birth years death ages native states and the names of their vicepresidents. The result must be ordered by birth year. We will need a join of the tables president and admin_pr_vp (because...) and as join-criterion the columns: pres_name and pres_name... Query: Explain the emergence of 3 rows with Nixon R M. SELECT P.pres_name birth_yr death_age state_born vice_pres_name P admin_pr_vp A WHERE P.pres_name = A.pres_name AND birth_yr >= 1900 ORDER BY birth_yr PRES_NAME BIRTH_YR DEATH_AGE STATE_BORN VICE_PRES_NAME Johnson L B Texas Humphrey H H Reagan R 1911 (null) Illinois Bush G Ford G R 1913 (null) Nebraska Rockefeller N Nixon R M 1913 (null) California Agnew S T Nixon R M 1913 (null) California Agnew S T Nixon R M 1913 (null) California Ford G R Kennedy J F Massachusetts Johnson L B Carter J E 1924 (null) Georgia Mondale W F %@5 "" SELECT Male.firstname Female.firstname FROM Male Female Ł ( " & ### 7 ):?J& 7 Ł -4 4& K 4M# %=% A subquery permits a SQL user to phrase in one query a complicated question which would otherwise have required more than one query Example: show the president(s) which had the highest number of children (in one marriage). Show also that number of children. Solution: SELECT pres_name nr_children FROM pres_marriage WHERE nr_children = ( SELECT MAX ( nr_children ) FROM pres_marriage ) PRES_NAME NR_CHILDREN Harrison W H 10 Remarks: With = you can test if one value is equal to one (other) value. To test if one value can be in a set (collection) of values: use the IN -operator. 0 %=% #G 5 / To test if one value can be in a set (collection) of values: use the IN -operator. Example: show the president -data of the presidents with more than 3 hobbies. Solution: SELECT WHERE pres_name IN ( SELECT pres_name FROM pres_hobby GROUP BY pres_name HAVING COUNT() > 3 ) PRES_NAME BIRTH_YR YRS_SERV DEATH_AGE PARTY STATE_BORN Roosevelt T Republican New York Coolidge C Republican Vermont Eisenhower D D Republican Texas Remark: with a subquery you just can compare one-value with a set of one-values. So not admitted is: WHERE pres_name IN ( SELECT pres_name COUNT()
9 %=% #H "# SELECT pres_name death_age WHERE pres_name IN ( SELECT pres_name FROM pres_marriage GROUP BY pres_name HAVING COUNT () > 1 ) ORDER BY pres_name 9 PRES_NAME DEATH_AGE Fillmore M 74 Harrison B 67 Reagan R (null) Roosevelt T 60 Tyler J 71 Wilson W 67 2 "'" $ # %=% -A/ Question 1 : Establish an SQL-query to find a correct answer to the next information demand on the presidential database: R ) ) ) K9M % ) K&M % % ) # ' % A5 () ) ) K9M ) K&M % % ) # Analysis:... )? U = U G ) U P " B ### Analysis:... U : K9M " U G & " 9( U = U = L" Analysis:... ' % A5 3 > = > G ) > P " - &&&/ > : K9M " > G & " "=% > = > = L" Strategy:... : "& 9 " Ł )K M " Ł 4 )KM ' % AB -' (5=% / Strategy:... : "& 9 " Ł )K M " Ł 4 )KM The SQL-query:... ( C") $ 8 " =#= L%L %" = =%= L"P =# LFP # L 0 # "FV9K 0 # L G C 9
10 % =% ; Question 2 : Establish an SQL-query to find a correct answer to the next information demand on the presidential database: R) ) ) % % % ) ) # Analysis:... ' % ;5 (R ) ) ) % % % ) ) # )? U = U G ) U B ### U = 9( U = U = L Analysis:... ' % ;B 3 > = > G ) > - &&&/ > = "=% > = > = L ' % ;B 7 Ł Analyse the result of such a (just) join-query : > : > Q 4 & % # 0 " 4 U ) " L U O " & U O ) 1 ' %;B 7 O ) N " &I ' %;5 J9H : =9@'@G =%=9@L:-99-R@ : O =# L F:# L =" R 9H C = W =# L%L Ł ". ###%L / N P -TG R BH CG X E
11 ' %;B -' B =# L%L %C: L J9H : =9@'@G =%=9@L:-99-R@ : O =# L F:# L R9H C=W =# L%L P -TG R BH CG X E - 9 PRES_NAME STATE_BORN SUM Fillmore M New York 2 Harrison B Ohio 3 Reagan R Illinois 4 Roosevelt T New York 6 Tyler J Virginia 15 Wilson W Virginia 3 #J "%G ) ;55# R)"&( ""? )$ # "?? ###$ If necessary: study the content of parts of the electronic SQL-manual till page 32. Establish SQL-queries to give correct answers to the next information demands on the presidential database (and test your queries...): 1. Which presidents died before the age of 65 years and were born in the state Ohio or in the state Virginia? 2. Give an overview with for each administration period the numbers of states that joined the USA. 3. What is the longest period (years of service) that a person was president? 4. Show the hobbies (and names) of the presidents Eisenhower and Truman. 5. Which persons where vice-president from one of the Adams -presidents? 6. Give in one result table the overall number of presidents the sum of their birth years that sum divided by their number and finally their average birth year (did you expect the relation between the results? Why?) 7. Which presidents got in at least one marriage (or in both marriages separate) more than 5 children? Show their names spouse-names marriage-year and number of children of such a marriage. 8. Give in opposite-ordered way (from Z => A ) the names of the various political parties that provided one or more presidents (each name may appear just one time) % 3 3 &&&-% D/ If necessary: study the content of parts of the electronic SQL-manual page Try to establish SQL-queries as well with a join - as with a subquery-construction to give correct answers to the next information demands on the presidential database (and test your queries...). If it is not possible to use one of these constructions explain why you can not use it 1. Out of which states came presidents that never participated as candidate in elections. Show the names of those states and also from those presidents. a) with a join-construction:? b) with a subquery-construction:? 2. Give for the president that was born in the same year as the state Minnesota entered in the USA his name his native state and the name of his spouse. a) with a join-construction:? b) with a subquery-construction:? 3. Who was vice-president of the president that married Mrs. 'Smith M M'? a) with a join-construction:? b) with a subquery-construction:? 4. Which vice-presidents that participated in elections to become a real president have never been president? Take care that each name appears just once in the result table. a) with a join-construction:? b) with a subquery-construction:? 11
United States Presidents
U.S. Presidents 1789-1845 Item 4213-A Name United States Presidents 1789-1845 M N Y P Y T Q K F Z B Z W B O E J A C K S O N Y A W O O N R Y P P F T E S A V I Z C R U P R Y C H S D D E P L N O B L M I L
More informationDatabase Systems SQL. A.R. Hurson 323 CS Building
SQL A.R. Hurson 323 CS Building Structured Query Language (SQL) The SQL language has the following features as well: Embedded and Dynamic facilities to allow SQL code to be called from a host language
More informationLecture 41 Sections Mon, Apr 7, 2008
Lecture 41 Sections 14.1-14.3 Hampden-Sydney College Mon, Apr 7, 2008 Outline 1 2 3 4 5 one-proportion test that we just studied allows us to test a hypothesis concerning one proportion, or two categories,
More informationHomework Assignment 2. Due Date: October 17th, CS425 - Database Organization Results
Name CWID Homework Assignment 2 Due Date: October 17th, 2017 CS425 - Database Organization Results Please leave this empty! 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.15 2.16 2.17 2.18 2.19 Sum
More informationCS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #3: SQL---Part 1
CS 4604: Introduc0on to Database Management Systems B. Aditya Prakash Lecture #3: SQL---Part 1 Announcements---Project Goal: design a database system applica=on with a web front-end Project Assignment
More informationNew Educators Campaign Weekly Report
Campaign Weekly Report Conversations and 9/24/2017 Leader Forms Emails Collected Text Opt-ins Digital Journey 14,661 5,289 4,458 7,124 317 13,699 1,871 2,124 Pro 13,924 5,175 4,345 6,726 294 13,086 1,767
More informationContingency Tables. Safety equipment in use Fatal Non-fatal Total. None 1, , ,128 Seat belt , ,878
Contingency Tables I. Definition & Examples. A) Contingency tables are tables where we are looking at two (or more - but we won t cover three or more way tables, it s way too complicated) factors, each
More informationPsych 230. Psychological Measurement and Statistics
Psych 230 Psychological Measurement and Statistics Pedro Wolf December 9, 2009 This Time. Non-Parametric statistics Chi-Square test One-way Two-way Statistical Testing 1. Decide which test to use 2. State
More informationRama Nada. -Ensherah Mokheemer. 1 P a g e
- 9 - Rama Nada -Ensherah Mokheemer - 1 P a g e Quick revision: Remember from the last lecture that chi square is an example of nonparametric test, other examples include Kruskal Wallis, Mann Whitney and
More informationForecasting: Intentions, Expectations, and Confidence. David Rothschild Yahoo! Research, Economist December 17, 2011
Forecasting: Intentions, Expectations, and Confidence David Rothschild Yahoo! Research, Economist December 17, 2011 Forecasts: Individual-Level Information Gather information from individuals, analyze
More informationQuantitative Analysis and Empirical Methods
Hypothesis testing Sciences Po, Paris, CEE / LIEPP Introduction Hypotheses Procedure of hypothesis testing Two-tailed and one-tailed tests Statistical tests with categorical variables A hypothesis A testable
More informationIntercity Bus Stop Analysis
by Karalyn Clouser, Research Associate and David Kack, Director of the Small Urban and Rural Livability Center Western Transportation Institute College of Engineering Montana State University Report prepared
More informationSideNail. Martín Schonaker, Santiago Martínez
SideNail Martín Schonaker, Santiago Martínez March 24, 2010 2 Chapter 1 Quickstart 1.1 Hello, World! Listing 1.1 shows the simplest mapping example one can build with SideNail. The example shows how to
More informationJakarta International School 6 th Grade Formative Assessment Graphing and Statistics -Black
Jakarta International School 6 th Grade Formative Assessment Graphing and Statistics -Black Name: Date: Score : 42 Data collection, presentation and application Frequency tables. (Answer question 1 on
More informationHourly Precipitation Data Documentation (text and csv version) February 2016
I. Description Hourly Precipitation Data Documentation (text and csv version) February 2016 Hourly Precipitation Data (labeled Precipitation Hourly in Climate Data Online system) is a database that gives
More informationBIOS 625 Fall 2015 Homework Set 3 Solutions
BIOS 65 Fall 015 Homework Set 3 Solutions 1. Agresti.0 Table.1 is from an early study on the death penalty in Florida. Analyze these data and show that Simpson s Paradox occurs. Death Penalty Victim's
More informationP Q1 Q2 Q3 Q4 Q5 Tot (60) (20) (20) (20) (60) (20) (200) You are allotted a maximum of 4 hours to complete this exam.
Exam INFO-H-417 Database System Architecture 13 January 2014 Name: ULB Student ID: P Q1 Q2 Q3 Q4 Q5 Tot (60 (20 (20 (20 (60 (20 (200 Exam modalities You are allotted a maximum of 4 hours to complete this
More informationMass Asset Additions. Overview. Effective mm/dd/yy Page 1 of 47 Rev 1. Copyright Oracle, All rights reserved.
Overview Effective mm/dd/yy Page 1 of 47 Rev 1 System References None Distribution Oracle Assets Job Title * Ownership The Job Title [list@yourcompany.com?subject=eduxxxxx] is responsible for ensuring
More informationhypotheses. P-value Test for a 2 Sample z-test (Large Independent Samples) n > 30 P-value Test for a 2 Sample t-test (Small Samples) n < 30 Identify α
Chapter 8 Notes Section 8-1 Independent and Dependent Samples Independent samples have no relation to each other. An example would be comparing the costs of vacationing in Florida to the cost of vacationing
More informationb. states.xml Listing of states and their postal abbreviations.
Background Information Mankind with all of its inventions and weapons has the false belief that it is in control of the environment. All too often the weather delivers a reminder that we are not invincible.
More informationEECS-3421a: Test #2 Electrical Engineering & Computer Science York University
18 November 2015 EECS-3421a: Test #2 1 of 16 EECS-3421a: Test #2 Electrical Engineering & Computer Science York University Family Name: Given Name: Student#: CSE Account: Instructor: Parke Godfrey Exam
More informationChapter 12: Model Specification and Development
Chapter 12: Model Specification and Development Chapter 12 Outline Model Specification: Ramsey REgression Specification Error Test (RESET) o RESET Logic o Linear Demand Model o Constant Elasticity Demand
More informationSub-Queries in SQL SQL. 3 Types of Sub-Queries. 3 Types of Sub-Queries. Scalar Sub-Query Example. Scalar Sub-Query Example
SQL Sub-Queries in SQL Peter Y. Wu Department of Computer and Information Systems Robert Morris University Data Definition Language Create table for schema and constraints Drop table Data Manipulation
More informationMultivariate Statistics
Multivariate Statistics Chapter 6: Cluster Analysis Pedro Galeano Departamento de Estadística Universidad Carlos III de Madrid pedro.galeano@uc3m.es Course 2017/2018 Master in Mathematical Engineering
More informationTest and Evaluation of an Electronic Database Selection Expert System
282 Test and Evaluation of an Electronic Database Selection Expert System Introduction As the number of electronic bibliographic databases available continues to increase, library users are confronted
More informationExam 1. March 12th, CS525 - Midterm Exam Solutions
Name CWID Exam 1 March 12th, 2014 CS525 - Midterm Exam s Please leave this empty! 1 2 3 4 5 Sum Things that you are not allowed to use Personal notes Textbook Printed lecture notes Phone The exam is 90
More informationGFC_DEFRAG: FREE SPACE DEFRAGMENTATION UTILITY PACKAGE
T E C H N I C A L N O T E GFC_DEFRAG: FREE SPACE DEFRAGMENTATION UTILITY PACKAGE Prepared By David Kurtz, Go-Faster Consultancy Ltd. Technical Note Version 1.01 Tuesday 5 February 2013 (E-mail: david.kurtz@go-faster.co.uk,
More informationCSSS/STAT/SOC 321 Case-Based Social Statistics I. Levels of Measurement
CSSS/STAT/SOC 321 Case-Based Social Statistics I Levels of Measurement Christopher Adolph Department of Political Science and Center for Statistics and the Social Sciences University of Washington, Seattle
More informationContingency Tables. Contingency tables are used when we want to looking at two (or more) factors. Each factor might have two more or levels.
Contingency Tables Definition & Examples. Contingency tables are used when we want to looking at two (or more) factors. Each factor might have two more or levels. (Using more than two factors gets complicated,
More informationPassing-Bablok Regression for Method Comparison
Chapter 313 Passing-Bablok Regression for Method Comparison Introduction Passing-Bablok regression for method comparison is a robust, nonparametric method for fitting a straight line to two-dimensional
More informationThe Davison Presidential Technique. First presented on May 20, 2008, 2:30 pm MDT, in Denver, CO, at the United Astrology Congress
The Davison Presidential Technique First presented on May 20, 2008, 2:30 pm MDT, in Denver, CO, at the United Astrology Congress Introduction What is a Davison relationship chart? How is it different from
More informationREVIEW 8/2/2017 陈芳华东师大英语系
REVIEW Hypothesis testing starts with a null hypothesis and a null distribution. We compare what we have to the null distribution, if the result is too extreme to belong to the null distribution (p
More informationSolutions: Monday, October 22
Amherst College Department of Economics Economics 360 Fall 2012 1. Focus on the following agricultural data: Solutions: Monday, October 22 Agricultural Production Data: Cross section agricultural data
More informationOnline Appendix: Can Easing Concealed Carry Deter Crime?
Online Appendix: Can Easing Concealed Carry Deter Crime? David Fortunato University of California, Merced dfortunato@ucmerced.edu Regulations included in institutional context measure As noted in the main
More informationON A CONJECTURE OF WILLIAM HERSCHEL
ON A CONJECTURE OF WILLIAM HERSCHEL By CHRISTOPHER C. KRUT A THESIS PRESENTED TO THE GRADUATE SCHOOL OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF
More informationGEOGRAPHY 350/550 Final Exam Fall 2005 NAME:
1) A GIS data model using an array of cells to store spatial data is termed: a) Topology b) Vector c) Object d) Raster 2) Metadata a) Usually includes map projection, scale, data types and origin, resolution
More informationA course in statistical modelling. session 06b: Modelling count data
A Course in Statistical Modelling University of Glasgow 29 and 30 January, 2015 session 06b: Modelling count data Graeme Hutcheson 1 Luiz Moutinho 2 1 Manchester Institute of Education Manchester university
More informationQF (Build 1010) Widget Publishing, Inc Page: 1 Batch: 98 Test Mode VAC Publisher's Statement 03/15/16, 10:20:02 Circulation by Issue
QF 1.100 (Build 1010) Widget Publishing, Inc Page: 1 Circulation by Issue Qualified Non-Paid Circulation Qualified Paid Circulation Individual Assoc. Total Assoc. Total Total Requester Group Qualified
More informationSTP 226 EXAMPLE EXAM #3 INSTRUCTOR:
STP 226 EXAMPLE EXAM #3 INSTRUCTOR: Honor Statement: I have neither given nor received information regarding this exam, and I will not do so until all exams have been graded and returned. Signed Date PRINTED
More information1988 Chilean Elections
1988 Chilean Elections Voting Intentions in Chile Team 6 Jason Andrew Carrie Boyle Greg Fries Ramana Reddy Agenda Background information-carrie Data set-jason Results of classification analysis- Ramana
More informationThis manual is Copyright 1997 Gary W. Oehlert and Christopher Bingham, all rights reserved.
This file consists of Chapter 4 of MacAnova User s Guide by Gary W. Oehlert and Christopher Bingham, issued as Technical Report Number 617, School of Statistics, University of Minnesota, March 1997, describing
More informationManipulating Radicals
Lesson 40 Mathematics Assessment Project Formative Assessment Lesson Materials Manipulating Radicals MARS Shell Center University of Nottingham & UC Berkeley Alpha Version Please Note: These materials
More informationSt Albans School 12+ Mathematics Specimen
St Albans School 1+ Mathematics Specimen [This specimen paper is intended to give an indication of the level of knowledge expected from candidates. Questions on any particular topic may be easier or more
More information. ) =-, *+ 7 4* 8 ) 0 *+ 7 (c. 0 A #B (d
(97!" #$) IT "0 / +,-.* 4 7,0,5 6.A 0 A+;,.89 ; ?$.0, 7 -.! %&!"# (a. R *+ 0 K K,-./ R ) *+ K ( K (b (97 - )./! 4 5 6, Connection String (c, *+ 7 8 *+ 7 0 *9 7 R ) (d. 4* c a ( b a ( c b (4 b d (
More informationA CLOSER LOOK AT SOCIAL SECURITY NUMBERS
A CLOSER LOOK AT SOCIAL SECURITY NUMBERS Evolution & Applicability in Background Screening BACKGROUND Despite the growing trend to restrict the use of an individual s Social Security number (SSN) in the
More informationSupplementary Materials for Congressional Decision Making and the Separation of Powers
Supplementary Materials for Congressional Decision Making and the Separation of Powers Andrew D. Martin February 19, 2001 1 Table 1: House Hierarchical Probit Estimates Strategic Model (Nominate Second
More informationSUPPLEMENTAL NUTRITION ASSISTANCE PROGRAM QUALITY CONTROL ANNUAL REPORT FISCAL YEAR 2008
SUPPLEMENTAL NUTRITION ASSISTANCE PROGRAM QUALITY CONTROL ANNUAL REPORT FISCAL YEAR 2008 U.S. DEPARTMENT OF AGRICULTURE FOOD AND NUTRITION SERVICE PROGRAM ACCOUNTABILITY AND ADMINISTRATION DIVISION QUALITY
More informationPlace Syntax Tool (PST)
Place Syntax Tool (PST) Alexander Ståhle To cite this report: Alexander Ståhle (2012) Place Syntax Tool (PST), in Angela Hull, Cecília Silva and Luca Bertolini (Eds.) Accessibility Instruments for Planning
More informationIntroducing GIS analysis
1 Introducing GIS analysis GIS analysis lets you see patterns and relationships in your geographic data. The results of your analysis will give you insight into a place, help you focus your actions, or
More informationAbortion Facilities Target College Students
Target College Students By Kristan Hawkins Executive Director, Students for Life America Ashleigh Weaver Researcher Abstract In the Fall 2011, Life Dynamics released a study entitled, Racial Targeting
More informationCorrelated subqueries. Query Optimization. Magic decorrelation. COUNT bug. Magic example (slide 2) Magic example (slide 1)
Correlated subqueries Query Optimization CPS Advanced Database Systems SELECT CID FROM Course Executing correlated subquery is expensive The subquery is evaluated once for every CPS course Decorrelate!
More information2. AXIOMATIC PROBABILITY
IA Probability Lent Term 2. AXIOMATIC PROBABILITY 2. The axioms The formulation for classical probability in which all outcomes or points in the sample space are equally likely is too restrictive to develop
More informationTypical information required from the data collection can be grouped into four categories, enumerated as below.
Chapter 6 Data Collection 6.1 Overview The four-stage modeling, an important tool for forecasting future demand and performance of a transportation system, was developed for evaluating large-scale infrastructure
More informationMultinomial Logistic Regression Models
Stat 544, Lecture 19 1 Multinomial Logistic Regression Models Polytomous responses. Logistic regression can be extended to handle responses that are polytomous, i.e. taking r>2 categories. (Note: The word
More informationChapter 26: Comparing Counts (Chi Square)
Chapter 6: Comparing Counts (Chi Square) We ve seen that you can turn a qualitative variable into a quantitative one (by counting the number of successes and failures), but that s a compromise it forces
More informationLineage implementation in PostgreSQL
Lineage implementation in PostgreSQL Andrin Betschart, 09-714-882 Martin Leimer, 09-728-569 3. Oktober 2013 Contents Contents 1. Introduction 3 2. Lineage computation in TPDBs 4 2.1. Lineage......................................
More informationOne-Way ANOVA. Some examples of when ANOVA would be appropriate include:
One-Way ANOVA 1. Purpose Analysis of variance (ANOVA) is used when one wishes to determine whether two or more groups (e.g., classes A, B, and C) differ on some outcome of interest (e.g., an achievement
More informationNEW CONCEPTS - SOIL SURVEY OF THE FUTURE
NEW CONCEPTS - SOIL SURVEY OF THE FUTURE The new process of doing soil surveys by Major Land Resource Areas (MLRA) highlights this section. Special emphasis is given to an overview of the National Soil
More informationA Gender Determination Technique C.Kadirvelu March 12, 2005
A Gender Determination Technique C.Kadirvelu March 12, 2005 Introduction KP literature contains various rules for determining the gender of a native s child. One such rule is: Take the 5 th cuspal sublord
More informationCollaborative Forecasts Implementation Guide
Collaborative Forecasts Implementation Guide Version 1, Spring 16 @salesforcedocs Last updated: February 11, 2016 Copyright 2000 2016 salesforce.com, inc. All rights reserved. Salesforce is a registered
More informationOctober 2016 v1 12/10/2015 Page 1 of 10
State Section S s Effective October 1, 2016 Overview The tables list the Section S items that will be active on records with a target date on or after October 1, 2016. The active on each item subset code
More informationSupplementary Material
Supplementary Material Contents 1 Keywords of GQL 2 2 The GQL grammar 3 3 THE GQL user guide 4 3.1 The environment........................................... 4 3.2 GQL projects.............................................
More informationFACTORS AFFECTING CONCURRENT TRUNCATE
T E C H N I C A L N O T E FACTORS AFFECTING CONCURRENT TRUNCATE DURING BATCH PROCESSES Prepared By David Kurtz, Go-Faster Consultancy Ltd. Technical Note Version 1.00 Thursday 2 April 2009 (E-mail: david.kurtz@go-faster.co.uk,
More informationClub Convergence and Clustering of U.S. State-Level CO 2 Emissions
Methodological Club Convergence and Clustering of U.S. State-Level CO 2 Emissions J. Wesley Burnett Division of Resource Management West Virginia University Wednesday, August 31, 2013 Outline Motivation
More informationLecture 41 Sections Wed, Nov 12, 2008
Lecture 41 Sections 14.1-14.3 Hampden-Sydney College Wed, Nov 12, 2008 Outline 1 2 3 4 5 6 7 one-proportion test that we just studied allows us to test a hypothesis concerning one proportion, or two categories,
More informationDictionary: an abstract data type
2-3 Trees 1 Dictionary: an abstract data type A container that maps keys to values Dictionary operations Insert Search Delete Several possible implementations Balanced search trees Hash tables 2 2-3 trees
More informationChapter 2 Integers and Introduction to Solving Equations
Chapter Integers and Introduction to Solving Equations.1 Check Points 1. a. 500 b. 8.. a. 6> 7 because 6 is to the right of 7 on the number line. b. 8< 1 because 8 is to the left of 1 on the number line.
More informationAnalysis of Covariance (ANCOVA) with Two Groups
Chapter 226 Analysis of Covariance (ANCOVA) with Two Groups Introduction This procedure performs analysis of covariance (ANCOVA) for a grouping variable with 2 groups and one covariate variable. This procedure
More informationJAN/FEB MAR/APR MAY/JUN
QF 1.100 (Build 1010) Widget Publishing, Inc Page: 1 Circulation Breakdown by Issue Qualified Non-Paid Qualified Paid Previous This Previous This Total Total issue Removals Additions issue issue Removals
More informationRetrieve and Open the Data
Retrieve and Open the Data 1. To download the data, click on the link on the class website for the SPSS syntax file for lab 1. 2. Open the file that you downloaded. 3. In the SPSS Syntax Editor, click
More informationMultivariate Analysis
Multivariate Analysis Chapter 5: Cluster analysis Pedro Galeano Departamento de Estadística Universidad Carlos III de Madrid pedro.galeano@uc3m.es Course 2015/2016 Master in Business Administration and
More informationOptimization - Examples Sheet 1
Easter 0 YMS Optimization - Examples Sheet. Show how to solve the problem min n i= (a i + x i ) subject to where a i > 0, i =,..., n and b > 0. n x i = b, i= x i 0 (i =,...,n). Minimize each of the following
More informationMajor Crime Map Help Documentation
Major Crime Map Help Documentation This web application is designed to make it easier to visualize and understand crime trends in Overland Park. The data for this application are generally limited to relatively
More informationand the Sample Mean Random Sample
MATH 183 Random Samples and the Sample Mean Dr. Neal, WKU Henceforth, we shall assume that we are studying a particular measurement X from a population! for which the mean µ and standard deviation! are
More informationGeodatabase Best Practices. Dave Crawford Erik Hoel
Geodatabase Best Practices Dave Crawford Erik Hoel Geodatabase best practices - outline Geodatabase creation Data ownership Data model Data configuration Geodatabase behaviors Data integrity and validation
More information10.2: The Chi Square Test for Goodness of Fit
10.2: The Chi Square Test for Goodness of Fit We can perform a hypothesis test to determine whether the distribution of a single categorical variable is following a proposed distribution. We call this
More informationWeek 8 Hour 1: More on polynomial fits. The AIC
Week 8 Hour 1: More on polynomial fits. The AIC Hour 2: Dummy Variables Hour 3: Interactions Stat 302 Notes. Week 8, Hour 3, Page 1 / 36 Interactions. So far we have extended simple regression in the following
More informationData Collection. Lecture Notes in Transportation Systems Engineering. Prof. Tom V. Mathew. 1 Overview 1
Data Collection Lecture Notes in Transportation Systems Engineering Prof. Tom V. Mathew Contents 1 Overview 1 2 Survey design 2 2.1 Information needed................................. 2 2.2 Study area.....................................
More informationNotes 3: Statistical Inference: Sampling, Sampling Distributions Confidence Intervals, and Hypothesis Testing
Notes 3: Statistical Inference: Sampling, Sampling Distributions Confidence Intervals, and Hypothesis Testing 1. Purpose of statistical inference Statistical inference provides a means of generalizing
More informationHW3, for MATH441, STAT461, STAT561, due September 20th
HW3, for MATH441, STAT461, STAT561, due September 20th 1. Suppose A and B are independent with 0 < P (A), P (B) < 1. Show that A c and B c are also independent. Solution. We know that P (AB) = P (A)P (B)
More informationA C E. Answers Investigation 3. Applications. 2 are equivalent. It takes 3 thirds to. 1 or 1. 4 or. 2 or
Applications Answers Investigation. and are equivalent. It takes thirds to make whole, so thirds is equivalent to wholes and one third.. B. (See Figure.). Answers will vary. (See Figure.) Pay attention
More informationWhy should you care?? Intellectual curiosity. Gambling. Mathematically the same as the ESP decision problem we discussed in Week 4.
I. Probability basics (Sections 4.1 and 4.2) Flip a fair (probability of HEADS is 1/2) coin ten times. What is the probability of getting exactly 5 HEADS? What is the probability of getting exactly 10
More informationPresidential and Congressional Vote-Share Equations
Presidential and Congressional Vote-Share Equations Ray C. Fair February 2007 Abstract Three vote-share equations are estimated and analyzed in this paper, one for presidential elections, one for on-term
More informationLecture 9. Selected material from: Ch. 12 The analysis of categorical data and goodness of fit tests
Lecture 9 Selected material from: Ch. 12 The analysis of categorical data and goodness of fit tests Univariate categorical data Univariate categorical data are best summarized in a one way frequency table.
More information6.080 / Great Ideas in Theoretical Computer Science Spring 2008
MIT OpenCourseWare http://ocw.mit.edu 6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
More informationCS1800: Strong Induction. Professor Kevin Gold
CS1800: Strong Induction Professor Kevin Gold Mini-Primer/Refresher on Unrelated Topic: Limits This is meant to be a problem about reasoning about quantifiers, with a little practice of other skills, too
More informationDiscrete distribution. Fitting probability models to frequency data. Hypotheses for! 2 test. ! 2 Goodness-of-fit test
Discrete distribution Fitting probability models to frequency data A probability distribution describing a discrete numerical random variable For example,! Number of heads from 10 flips of a coin! Number
More informationSTP 226 ELEMENTARY STATISTICS NOTES
STP 226 ELEMENTARY STATISTICS NOTES PART 1V INFERENTIAL STATISTICS CHAPTER 12 CHI SQUARE PROCEDURES 12.1 The Chi Square Distribution A variable has a chi square distribution if the shape of its distribution
More informationPrintable Activity book
Printable Activity book 16 Pages of Activities Printable Activity Book Print it Take it Keep them busy Print them out Laminate them or Put them in page protectors Put them in a binder Bring along a dry
More informationGambler's Ruin. May 22, Gambler's Ruin
Gambler's Ruin May 22, 2006 Gambler's Ruin Assume that p and q are non-negative real numbers with p+q = 1. The common distribution function of the jumps of the random walk is { p, if x = 1, f X (x) = q,
More informationAppendix A Statistical Tables
Appendix A Statistical Tables A.1 The Z (Standard Normal) Distribution The normal distribution the bell curve is a continuous, symmetric distribution that is peaked in the center and tapers away from the
More informationReading and Writing. Mathematical Proofs. Slides by Arthur van Goetham
Reading and Writing Mathematical Proofs Slides by Arthur van Goetham What is a proof? Why explanations are not proofs What is a proof? A method for establishing truth What establishes truth depends on
More informationSolving Linear Equations (in one variable)
Solving Linear Equations (in one variable) In Chapter of my Elementary Algebra text you are introduced to solving linear equations. The main idea presented throughout Sections.1. is that you need to isolate
More informationIntro to SQL. Two components. Data Definition Language (DDL): create table, etc. Data Manipulation Language (DML):
Intro to SQL Two components Data Definition Language (DDL): create table, etc. Data Manipulation Language (DML): select, insert, delete, update, etc. The basic SELECT statement: Select From Where A1, A2,...AN
More informationGeodatabase An Introduction
2013 Esri International User Conference July 8 12, 2013 San Diego, California Technical Workshop Geodatabase An Introduction David Crawford and Jonathan Murphy Session Path The Geodatabase What is it?
More informationCHAPTER 7 - FACTORIAL ANOVA
Between-S Designs Factorial 7-1 CHAPTER 7 - FACTORIAL ANOVA Introduction to Factorial Designs................................................. 2 A 2 x 2 Factorial Example.......................................................
More informationMultivariate Statistics
Multivariate Statistics Chapter 4: Factor analysis Pedro Galeano Departamento de Estadística Universidad Carlos III de Madrid pedro.galeano@uc3m.es Course 2017/2018 Master in Mathematical Engineering Pedro
More informationChapter. Organizing and Summarizing Data. Copyright 2013, 2010 and 2007 Pearson Education, Inc.
Chapter 2 Organizing and Summarizing Data Section 2.1 Organizing Qualitative Data Objectives 1. Organize Qualitative Data in Tables 2. Construct Bar Graphs 3. Construct Pie Charts When data is collected
More information2 - Strings and Binomial Coefficients
November 14, 2017 2 - Strings and Binomial Coefficients William T. Trotter trotter@math.gatech.edu Basic Definition Let n be a positive integer and let [n] = {1, 2,, n}. A sequence of length n such as
More informationEfficient query evaluation
Efficient query evaluation Maria Luisa Sapino Set of values E.g. select * from EMPLOYEES where SALARY = 1500; Result of a query Sorted list E.g. select * from CAR-IMAGE where color = red ; 2 Queries as
More information