Free Essay

Sample

In:

Submitted By marc0534
Words 1676
Pages 7
Command | @ | Description | Do not echo this line. | Syntax | @ command line | Typical Use | To hide a single line if echo is switched on, or to hide the switching off of the echo command. | Example | echo This line will be echoed twice to the screen,
@echo Whereas this line will occur only once. |

Command | ECHO | Description | The ECHO command has several different uses. MS DOS batch files use two echo 'modes'. The default echo mode is ECHO ON. When ECHO is set to ON, every command in the batch file is displayed to the screen before it is run. Sometimes this information is not required, and can even be downright annoying for larger batch files. The command ECHO OFF sets the batch echo mode to OFF. In this mode, the commands are not printed to the screen prior to their execution.
As well as the echo modes, the ECHO command is used to print a message to the user. Messages are displayed to the user by preceding a line of text with ECHO. | Syntax | ECHO MODE ON : ECHO ON
ECHO MODE OFF : ECHO OFF
DISPLAY A MESSAGE : ECHO message | Typical Use | The command @ECHO OFF is almost always placed at the top of a batch file to switch off subsequent command echo.
ECHO is also the only way a batch file can communicate information to a user. | Example | @ECHO OFF
ECHO Please insert a disk in drive A: and press any key when ready. |

Command | REM (short for remark) | Description | REM is the MS DOS batch file method of providing comments. Comments are lines of code which are not executed by the batch file, but rather are used to convey information about the workings of the batch file itself. Good batch file programming practice demands a comment at the head of every batch file explaining its use and syntax. Comments can also be put in other parts of the file to clarify ambiguous commands and to 'comment-out' a line of commands so that they are temporarily ignored by the batch file. | Syntax | REM line containing comment. | Typical Use | REM should be used at the top of every batch file to provide a description and example use. However, too many REM lines are not an example of good programming style! Don't provide a comment for obvious commands - only the tricky ones! | Example | REM SFORMAT.BAT : Safe Format
REM
REM This batch file implements a safe version of the format command.
REM The C: drive can not be formatted with this command. |

Command | PAUSE | Description | The PAUSE command prints the message "Press any key to continue..." to the screen and waits for the user to respond. | Syntax | PAUSE (it's as simple as that!) | Typical Use | The PAUSE command was the only method of getting a user's response in batch files until the choice command arrived in MS DOS 6.x. By issuing instructions with the ECHO command, the PAUSE command waited for the user to read them and respond appropriately. | Example | ECHO Please insert the disk in drive A: and
PAUSE |

Command | GOTO | Description | The GOTO command allows a batch file to branch to a different location to continue executing commands from. To tell the batch file where to go to, a label is placed after the GOTO command. This label must conform to several guidelines for it to be a valid batch file label. | Syntax | GOTO label | Typical Use | Until MS DOS 6.x introduced the FOR command, the GOTO command was a batch files only mechanism of performing a command repeatedly. GOTOs are still the only method in a batch file to perform a sub-set of commands. (MS DOS Batch files do not have sub-procedures) | Example | IF %1 == "" GOTO ERROR |

Command | IF | Description | The IF command is used in batch files to test whether a condition is met or not. This allows the batch file to perform a particular action only if a particular condition is met. There are several different variations of the IF command: IF EXIST, IF ERRORLEVEL, and IF x == y (yes! it does use two equal signs!) | Syntax | IF EXIST filename or dirname : used to test for the existance of a file or directory in MS DOS. This test will return true if the file does exist.
IF ERRORLEVEL : After a program has finished executing in MS DOS it returns a value to the operating system indicating its success or failure. This value is stored in the variable ERRORLEVEL. By testing this variable, a batch file can deduce the result of the program that just finished running.
IF x == y : This version of the IF statement tests two string values. If string x is equal to string y this test is evaluated to be true, otherwise false.
All of the above IF statements can also be negated with the NOT command. For example -:
IF NOT EXIST filename : Tests to see if the file doesn't exist. This test will return true if the file doesn't exist. | Typical Use | The IF statement is one of the most useful batch file commands, and as such is probably the most common. The IF EXIST command is used to check if a file exists before it is copied/moved/opened/etc. The IF ERRORLEVEL allows a batch file to check the return value of another program. The IF STRING1 == STRING2 is commonly used to validate command-line parameters. | Example | IF NOT EXIST %1 MKDIR %1IF ERRORLEVEL 2 GOTO ENDIF %1 == "" GOTO ERROR |

Command | SHIFT | Description | The SHIFT command is possibly, at first, the most confusing batch file command. It needn't be. Simply, the SHIFT command increases the number of command-line parameters accessable by a batch file. Each time SHIFT is called, the value in the 1st parameter is discarded and replaced by the value of the 2nd parameter. The value in the 2nd parameter is replaced by the value in the 3rd parameter, etcetera, etcetera, until the 9th parameter is replaced by the previously unavailable 10th parameter. | Syntax | SHIFT | Typical Use | The SHIFT command provides considerable power to batch files. It allows a batch file to operate on an unknown number of parameters. The SHIFT command is often used in situations where an operation needs to be performed on several files or directories. | Example | The following example displays the contents of the files typed after the batch file name one page at a time.:LOOP
TYPE %1 | MORE
SHIFT
IF "%1" == "" GOTO END
GOTO LOOP
:END |

Command | CALL | Description | The CALL command is used to run another batch file from within a batch file. Execution of the current batch file is paused and the called batch file is run. After the called batch file has finished running, the original batch file is resumed at the line after the CALL statement.
Note: If another batch file is run from within a batch file by simply using its name, after the called batch file finishes executing, control is returned to the Command Line, NOT the original batch file. | Syntax | CALL batchfilename [parameters] [switches] | Typical Use | The CALL command is used to provide modularity to batch files. Batch files can be re-used effortlessly if they are written with modularity in mind. | Example | IF %1 == A: CALL FLOPPY.BAT |

Command | FOR | Description | The FOR command was an invaluable addition to the DOS Batch File Command suite. FOR repeats a command for a number of files, directories, or text-strings. | Syntax | FOR variable IN list DO command [parameters] [switches]
Where -: * variable is substituted for each element in the list and passed to command. Variable has a special format in batch files. * list is a list of filenames (wildcards allowed), directory names, or text-strings that are to be processed by command one at a time. * command is a DOS internal or external command to be performed for each element of the list. | Typical Use | The FOR command performs the same command for each element of a list. Prior to its introduction, the same effect had to be achieved with GOTOs and IFs, which were messy and sometimes difficult to follow. Use a FOR to do any necessary looping in your batch files. | Example | The following is an implementation of the same example presented in the SHIFT example of displaying many files to the screen with MORE.FOR %%f IN (*.*) DO TYPE %%f | MOREA lot neater, huh?! |

Command | CHOICE | Description | The CHOICE command is perhaps the best addition to MS DOS Batch File commands. CHOICE makes it possible to accept various user-responses. Before now, users were presented with crude either/or choices in batch files. The CHOICE command allows a batch file to detect a users choice from a lits of options. | Syntax | CHOICE [/C:choices] [/N] [/S] [/T:choice,timeout] [TEXT]
Where -: * /C:choices : specifies the choices that the user can choose from. The choices can only be single characters. * /N : Do not display choices and the '?' at the end of the TEXT prompt. * /S : Treat the choices as case sensitive, meaning that 'a' is a different choice from 'A'. By default, case is not sensitive - 'a' is equivalent to 'A'. * /T:choice,timeout : Default to choice after timeout seconds. * TEXT : The text to display as the prompt of the choice. | Typical Use | The CHOICE command has its obvious use in batch files. It is now possible to easily get a users response, thus allowing batch files to be much more interactive, and therefore more useful. | Example | The following batch file snippet displays a simple menu (without a question-mark at the end of the prompt) and prompts for the users choice, defaulting to option 2 after 5 seconds :ECHO 1. MS-DOS Editor.
ECHO 2. MS-Windows. (default)
ECHO 3. Defrag the hard-drive.
ECHO 4. Quit.
CHOICE /C:1234 /N /T:2,5 Please choose a menu option.
IF ERRORLEVEL == 4 GOTO QUIT_MENU
IF ERRORLEVEL == 3 GOTO DEFRAG_HD
IF ERRORLEVEL == 2 GOTO RUN_WIN
IF ERRORLEVEL == 1 GOTO RUN_EDIT
:RUN_EDIT
CALL EDIT
:RUN_WIN
CALL WIN
:DEFRAG_HD
DEFRAG c:
:QUIT_MENU
ECHO Safe to switch off machine now... |

Similar Documents

Premium Essay

Sample

...DISTRIBUTIONS Simple Random Sample A simple random sample X 1 , , X n , taken from a population represented by a random variable X with mean  and standard deviation  , has the following characteristics.  Each X i , i  1,, n , is a random variable that has the same distribution as X, and thus the same mean  and standard deviation  . The X i ’s are independent random variables implying the following identity:  V  X 1    X n   V  X 1     V  X n    2     2  n 2  The sample mean, X where X  X1    X n , is a continuous random variable n with mean  X   and standard deviation  X  of the mean. Sampling Distribution of the Mean  , known as the standard error n Result 1: If X is Normal, then X is Normal and Z  of the sample n. X   n , regardless of the size Result 2: If n is large enough, n  30 , then X is approximately normal and X  Z , regardless of the distribution of the population random variable X.  n Sampling Distribution of the Proportion For a binomial random variable X with parameters n (sample size) and  (probability of X success or population proportion), the sample proportion is given by p  . n The sample proportion p is a continuous random variable with mean  p   and standard deviation  p   1    n . Result 3: If n is large enough, n  5 and n1     5 , then p is approximately p  normal and Z  .  1    n Why? We want to use the sample mean X to estimate...

Words: 360 - Pages: 2

Premium Essay

Sample Design

...3.1 Research Design 3.2 Sample Design 3.2.1 Target population It would be costly and timely for us to target the whole marketing industry hence we decided to target on specific segment group of UTAR undergraduate students in Sungai Long, Selangor. We study the behavioral respond view of UTAR undergraduate’s students on their perceived on quality, value and satisfaction toward the intention to recommend products or services. According by the Department of the Faculty General Office (FGO), there are estimated 2500 students, thus the recommended sample size is 250 students. With the 95% confidence level and +/-5% margin of error, 264 sets of questionnaire has been distributed to our respondents due to the possibilities of the occurrence of unused data. 3.2.2 Sampling Frame and Sampling Location In our research, we decide to distribute a total of questionnaires which we have prepared early to UTAR undergraduate students in Sungai Long, Selangor. The purpose of the different location chosen is because we want to acquire more precise results. 3.2.3 Sampling Technique Sampling method is a method for investigating a whole population and it includes of probability and non-probability samples. Probability samples are selected to be representative of the population. Then, non-probability is a sampling technique in which units of the sample are selected on the basis of personal judgment or convenience. There are four types of probability sampling techniques; one of them is systematic...

Words: 409 - Pages: 2

Premium Essay

Sample Paper

...Sample Paper Population definitionSuccessful statistical practice is based on focused problem definition. In sampling, this includes defining the population from which our sample is drawn. A population can be defined as including all people or items with the characteristic one wishes to understand. Because there is very rarely enough time or money to gather information from everyone or everything in a population, the goal becomes finding a representative sample (or subset) of that population. Sometimes that which defines a population is obvious. For example, a manufacturer needs to decide whether a batch of material from production is of high enough quality to be released to the customer, or should be sentenced for scrap or rework due to poor quality. In this case, the batch is the population. Although the population of interest often consists of physical objects, sometimes we need to sample over time, space, or some combination of these dimensions. For instance, an investigation of supermarket staffing could examine checkout line length at various times, or a study on endangered penguins might aim to understand their usage of various hunting grounds over time. For the time dimension, the focus may be on periods or discrete occasions. In other cases, our 'population' may be even less tangible. For example, Joseph Jagger studied the behaviour of roulette wheels at a casino in Monte Carlo, and used this to identify a biased wheel. In this case, the 'population' Jagger...

Words: 509 - Pages: 3

Free Essay

Sample Exam

...SAMPLE EXAMINATION The purpose of the following sample examination is to provide an example of what is provided on exam day by ASQ, complete with the same instructions that are provided on exam day. The test questions that appear in this sample examination are retired from the CSSBB pool and have appeared in past CSSBB examinations. Since they are now available to the public, they will NOT appear in future SSBB examinations. This sample examination WILL NOT be allowed into the exam room. Appendix A contains the answers to the sample test questions. ASQ will not provide scoring and analysis for this sample examination. Remember: These test questions will not appear on future examinations so your performance on this sample examination may not reflect how you perform on the formal examination. A self-appraisal of how well you know the content for the specific areas of the body of knowledge (BOK) can be completed by using the worksheet in Appendix B. On page 2 of the instructions, it states “There are 150 questions on this 4-hour examination.” Please note that this sample exam only contains 75 questions. If you have any questions regarding this sample examination, please email cert@asq.org © 2009 ASQ ASQ grants permission for individuals to use this sample examination as a means to prepare for the formal examination. This examination may be printed, reproduced and used for non-commercial, personal or educational purposes only, provided that (i) the examination is not modified...

Words: 4541 - Pages: 19

Free Essay

Sample Essay

...Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample.Sample...

Words: 8977 - Pages: 36

Premium Essay

Sample Size Formula

...Relationship between students’ achievement scores and scores on test anxiety scale (Total scale, Worry Scale and Emotional scale) Aspect N Pearson r Significance Total scale scores and achievement scores 138 - 0.653* 0.000 Worry scale scores and achievement scores 138 - 0.694* 0.000 Emotional scale scores and achievement scores 138 - 0.663* 0.000 It is evident from table 4 that a strong negative and significant relationship exists between students’ achievement scores and Total scale scores as well as on subscales scores. It is also found that achievements is significantly inversely related to both emotional and worry scales as well. The magnitude of the relationship is slightly higher on worry scale as compared to emotionality scale and total score. The range of relationship of each scale is more than 65% which is quite strong in magnitude. This stronger relationship encouraged to further analysis to explore the possibility of test anxiety as a predictor of students’ achievement. Therefore, a Regression analysis was run to explore the cause- effect relationship between achievement scores and test anxiety scale scores. The result is given in table 5. Relationship between Test Anxiety and Academic Achievement Regression analysis Model β t-value Significance Model R square Total anxiety scale scores -0.251 -0.6.700 0.000 Worry scale scores -0.697 -0 4.160 0.000 0.535 Emotional scale scores -0.140 -0.890 ...

Words: 388 - Pages: 2

Premium Essay

Qnt 561 Week 3 Sample Size and Data Collection

...QNT 561 Week 3 Sample Size and Data Collection Follow Below Link to Download Tutorial https://homeworklance.com/downloads/qnt-561-week-3-sample-size-and-data-collection/ For More Information Visit Our Website ( https://homeworklance.com/ ) Email us At: Support@homeworklance.com or lancehomework@gmail.com Sampling and Data Collection Plan – Assessment Activity – Week3 – QNT/561 – eCampus Part 1: Sampling Design Write a 350- to 700-word paper using the scenario and two variables your learning team developed for the Week 2 Business Research Project Part 1 assignment, in which the goal is to submit a random sampling plan in such detail that another researcher could replicate the method. Discuss the following: • Population and size • The target population and brief reasoning • Sampling element which may be conducted through any of the following: o Data mining o Survey (If a survey is chosen, create a 5-10 question document), or o Observation • The sample size • Method of random sampling which may include: o Simple o Stratified o Systematic o Cluster Calculate the sample size for the mean or sample or sample size for the proportion, using a 95% confidence level, estimated population standard deviation or estimate of the true population proportion, and a 5% margin of error. Place the calculation in the Appendix. Discuss how validity and reliability will be achieved. If applicable, explain how human subjects will be protected. Part 2: Data...

Words: 262 - Pages: 2

Premium Essay

Qnt 561 Week 3 Sample Size and Data Collection

...QNT 561 Week 3 Sample Size and Data Collection Click Link Below To Buy: http://hwaid.com/shop/qnt-561-week-3-sample-size-and-data-collection/ QNT 561 Week 3 Sample Size and Data Collection Sampling and Data Collection Plan – Assessment Activity – Week3 – QNT/561 – eCampus Part 1: Sampling Design Write a 350- to 700-word paper using the scenario and two variables your learning team developed for the Week 2 Business Research Project Part 1 assignment, in which the goal is to submit a random sampling plan in such detail that another researcher could replicate the method. Discuss the following: • Population and size • The target population and brief reasoning • Sampling element which may be conducted through any of the following: o Data mining o Survey (If a survey is chosen, create a 5-10 question document), or o Observation • The sample size • Method of random sampling which may include: o Simple o Stratified o Systematic o Cluster Calculate the sample size for the mean or sample or sample size for the proportion, using a 95% confidence level, estimated population standard deviation or estimate of the true population proportion, and a 5% margin of error. Place the calculation in the Appendix. Discuss how validity and reliability will be achieved. If applicable, explain how human subjects will be protected. Part 2: Data Collection Explain how the data will be physically collected. Explain where data will be stored and how it will be protected...

Words: 251 - Pages: 2

Premium Essay

Asbitch as Shit

...Definition of Terms Target population * the population we want to study Sampled population * the population from where we actually select the sample Sample * these are the elements from the sampled population who are actually selected to participate or to be the subject in the study Sample size * Total number of elements in the sample SAMPLING * the process of selecting a small number of elements from a larger defined target group of elements such that the information gathered from the small group will allow judgments to be made about the larger groups SAMPLING TECHNIQUES * PROBABILITY SAMPLING a method of selecting a sample wherein each element in the population has a known, nonzero chance of being included in the sample. Simple Random Sampling a probability sampling method wherein all members of the population have equal chances of being included in the study. When to use: * If the members of the population are not so spread geographically. * If the members are homogeneous with respect to the characteristic under study. Systematic Sampling probability sampling method wherein the selection of the first member (random start - r) is at random (using simple random sampling) and the selection of the other members in sample is systematic by successively taking every kth member from the random start, where k is the sampling interval. When to use: * If the arrangement of the members is according to magnitude...

Words: 820 - Pages: 4

Premium Essay

Sampling

...sampling Cluster sampling is a sampling technique where the entire population is divided into groups, or clusters and a random sample of these clusters are selected. All observations in the selected clusters are included in the sample. Cluster sampling is typically used when the researcher cannot get a complete list of the members of a population they wish to study but can get a complete list of groups or 'clusters' of the population. It is also used when a random sample would produce a list of subjects so widely scattered that surveying them would prove to be far too expensive, for example, people who live in different counties in the Country. Advantages One advantage of cluster sampling is that it is cheap, quick, and easy. Instead of sampling the entire country when using simple random sampling, the research can instead allocate resources to the few randomly selected clusters when using cluster sampling. A second advantage to cluster sampling is that the researcher can have a larger sample size than if he or she was using simple random sampling. Because the researcher will only have to take the sample from a number of clusters, he or she can select more subjects since they are more accessible. Disadvantages One main disadvantage of cluster sampling is that is the least representative of the population out of all the types of probability samples. It is common for individuals within a cluster to have similar characteristics, so when a researcher uses cluster sampling, there...

Words: 1337 - Pages: 6

Premium Essay

Sampling

...size of research population, it is not feasible to test all the individuals of the population since it will take too much time and will be expensive as well. So the researchers take few individuals from the research population ( a subset of the set of target population) using sampling techniques. These techniques helps to take out sample as per the requirements of the type of research that is to be conducted. A research population is also known as a well-defined collection of individuals or objects known to have similar characteristics. All individuals or objects within a certain population usually have a common, binding characteristic or trait. Usually, the description of the population and the common binding characteristic of its members are the same. "Government officials" is a well-defined group of individuals which can be considered as a population and all the members of this population are indeed officials of the government. There are various sources from which a sample is created. A set of all these sources is called a Sampling frame from which the sample is selected. With the help of sampling frames, researchers are able to select the sample population from the target population that will be tested for the research or survey. A sampling frame should have the following characteristics: Completeness: A frame should be complete in a sense that all the individuals of the target population should be covered in the frame. In case we are...

Words: 4006 - Pages: 17

Premium Essay

Sampling Design

...(1) Assign a single number to each element in the sampling frame. – (2) Use random numbers to select elements into the sample until the desired number of cases is obtained. • The method is not very different from winning a lottery. 2. Systematic Sampling • Steps: – (1) Calculate the sampling interval as the ratio between population size and sample size, I = N/n. – (2) Arrange all elements in the population in an order. – (3) Select a case in the first interval randomly. – (4) Select every ith case from this point. 2. Systematic Sampling (continued) I I 1st element, randomly chosen I I I I – Systematic Sampling is easier and simpler than SRS – The text warns of a danger to this method. What is it? 3. Stratified Sampling • Stratified sampling is more complicated than SRS. The advantage is the guaranteed representativeness in some important characteristics. • For example, say that we want to select a sample of 100 individuals. Sex ratio in the sample is up to chance if we do SRS. We can guarantee the 50-50 split if we do stratified sampling: Stratified Sampling, Graphic Representation Population SRS SRS Sample • Stratified sampling is often used to reduce the variability of a sample. Oversampling, Graphic Representation Population SRS SRS Sample • Increasing the representation of a group in a sample. This is often done when groups are very different in size – e.g., race 4. Cluster Sampling • Cluster sampling is...

Words: 921 - Pages: 4

Premium Essay

Pyc3704 Assignment 1

...Assignment One: Data Sheet 1 Kimmy Givins NorthCentral University Dr. Boysen-Rotelli 08/10/2014 Date File 1 Chapter One 1) Determine whether the evaluated group is a population or a sample. a) Based on a randomly selected group of 500 patients with high cholesterol, it was found that 67% have heart disease. Is this a population or a sample; explain your answer. Sample is made up of of the raw data collected from 500 patients which is the sample and 67% is the sample statistics. Bennett, Briggis, & Triola (2009) the raw data is collected from a subnet of patient with high cholesterol (p.3). Which indicate this as a sample from the raw data and sample statistics. b) An investigation of 150 randomly selected local restaurants concluded that 42% of local...

Words: 1907 - Pages: 8

Free Essay

Marketing Research

...All of the following data are demographic data except a. income b. age c. education d. residence e. religion * Data Types The following question elicits _____ data. How satisfied are you with the last flight you took with American Airlines? Very Somewhat Neutral Somewhat Very Dissatisfied Dissatisfied Satisfied Satisfied 1 2 3 4 5 a. demographic b. psychographic c. attitude d. behavioristic Types of variables marketing researchers may work with include all of the following except a. nominal b. ordinal c. logistic d. ratio The variable in which numbers serve only as labels to identify or categorize objects or events is the ____. a. nominal variable b. ordinal variable c. interval variable d. ratio variable The following question will result in a ____ variable. Which is your favorite Yogurt brand? __ Yoplait __ Dannon __ Chobani __ Stonyfield __ Other () a. nominal variable b. ordinal variable c. interval variable d. ratio variable Which type of scale is the following question? Please rank the importance of the following product features in your decision to buy a laptop computer. (1=most important, 4=least important) a. Rank order b. Likert scale ...

Words: 679 - Pages: 3

Premium Essay

Random Sampling Dq

...Simple Random Sampling is done when every individual subject in the population has an equal chance of being selected for the sample, without any bias (Explorable). For example, if a researcher wants to represent the population as a whole, they can pick random numbers or names out a hat or use a program to randomly choose names so the information is not biased. Stratified Sampling is performed by, dividing the population into at least two (or more) groups or sections, which share certain characteristics, called “strata” (Explorable). For example, a researcher who wants to compare the average economic status of different racial groups may use this technique in order to divide the population into groups based on race and ethnicities and then compare the whole average from each ethnic group. Cluster Sampling is done by dividing the population into separate sections or “clusters” and then picks a cluster randomly and chooses all the members from those clusters for the sample (Explorable). For example, using a geographical cluster, in order to look at the academic performance of students. The researcher can divide Nassau County in Long Island into clusters based on the towns. Then, randomly select a certain number of these clusters or towns and include all the students from those clusters to be part of the sample. Systematic Sampling is performed by, using and selecting a point at which to begin and then selecting every x number after that point (Explorable). For example,...

Words: 391 - Pages: 2