Odd and Even Permutation

Statistics – Odd and Even Permutation ”; Previous Next Consider X as a finite set of at least two elements then permutations of X can be divided into two category of equal size: even permutation and odd permutation. Odd Permutation Odd permutation is a set of permutations obtained from odd number of two element swaps in a set. It is denoted by a permutation sumbol of -1. For a set of n numbers where n > 2, there are ${frac {n!}{2}}$ permutations possible. For example, for n = 1, 2, 3, 4, 5, …, the odd permutations possible are 0, 1, 3, 12, 60 and so on… Example Compute the odd permutation for the following set: {1,2,3,4}. Solution: Here n = 4, thus total no. of odd permutation possible are ${frac {4!}{2} = frac {24}{2} = 12}$. Following are the steps to generate odd permutations. Step 1: Swap two numbers one time. Following are the permutations obtainable: ${ { 2, 1, 3, 4 } \[7pt] { 1, 3, 2, 4 } \[7pt] { 1, 2, 4, 3 } \[7pt] { 3, 2, 1, 4 } \[7pt] { 4, 2, 3, 1 } \[7pt] { 1, 4, 3, 2 } }$ Step 2: Swap two numbers three times. Following are the permutations obtainable: ${ { 2, 3, 4, 1 } \[7pt] { 2, 4, 1, 3 } \[7pt] { 3, 1, 4, 2 } \[7pt] { 3, 4, 2, 1 } \[7pt] { 4, 1, 2, 3 } \[7pt] { 4, 3, 1, 2 } }$ Even Permutation Even permutation is a set of permutations obtained from even number of two element swaps in a set. It is denoted by a permutation sumbol of +1. For a set of n numbers where n > 2, there are ${frac {n!}{2}}$ permutations possible. For example, for n = 1, 2, 3, 4, 5, …, the even permutations possible are 0, 1, 3, 12, 60 and so on… Example Compute the even permutation for the following set: {1,2,3,4}. Solution: Here n = 4, thus total no. of even permutation possible are ${frac {4!}{2} = frac {24}{2} = 12}$. Following are the steps to generate even permutations. Step 1: Swap two numbers zero time. Following is the permutation obtainable: ${ { 1, 2, 3, 4 } }$ Step 2: Swap two numbers two times. Following are the permutations obtainable: ${ { 1, 3, 4, 2 } \[7pt] { 1, 4, 2, 3 } \[7pt] { 2, 1, 4, 3 } \[7pt] { 2, 3, 1, 4 } \[7pt] { 2, 4, 3, 1 } \[7pt] { 3, 1, 2, 4 } \[7pt] { 3, 2, 4, 1 } \[7pt] { 3, 4, 1, 2 } \[7pt] { 4, 1, 3, 2 } \[7pt] { 4, 2, 1, 3 } \[7pt] { 4, 3, 2, 1 } }$ Print Page Previous Next Advertisements ”;

Required Sample Size

Statistics – Required Sample Size ”; Previous Next A critical part of testing is the choice of the measure of test i.e. the quantity of units to be chosen from the populace for completing the exploration. There is no unequivocal answer or answer for characterizing the most suitable size. There are sure misguided judgments with respect to the span of test like the example ought to be 10% of the populace or the specimen size is relative to the extent of the universe. However as said before, these are just misguided judgments. How extensive a specimen ought to be is capacity of the variety in the populace parameters under study and the assessing exactness required by the specialist. The decision on optimum size of the sample can be approached from two angles viz. the subjective and mathematical. Subjective Approach to Determining Sample Size Mathematical Approach to Sample Size Determination Subjective Approach to Determining Sample Size The choice of the size of sample is affected by various factors discussed as below: The Nature of Population – The level of homogeneity or heterogeneity influences the extent of a specimen. On the off chance that the populace is homogeneous concerning the qualities of interest then even a little size of the specimen is adequate. However in the event that the populace is heterogeneous then a bigger example would be required to guarantee sufficient representativeness. Nature of Respondent – If the respondents are effortlessly accessible and available then required data can be got from a little example. On the off chance that, notwithstanding, the respondents are uncooperative and non-reaction is relied upon to be high then a bigger specimen is required. Nature of Study – A onetime study can be led utilizing a substantial example. If there should be an occurrence of examination studies which are of constant nature and are to be seriously completed, a little specimen is more suitable as it is anything but difficult to oversee and hold a little example over a long compass of time. Sampling Technique Used – An essential variable affecting the span of test is the examining system received. Firstly a non-likelihood system requires a bigger specimen than a likelihood strategy. Besides inside of likelihood testing, if straightforward irregular examining is utilized it requires a bigger example than if stratification is utilized, where a little specimen is adequate. Complexity of Tabulation – While settling on the specimen estimate the specialist ought to likewise consider the quantity of classifications and classes into which the discoveries are to be assembled and broke down. It has been seen that more the quantity of classifications that are to be produced the bigger is the example size. Since every class ought to be enough spoken to, a bigger specimen is required to give solid measures of the littlest classification. Availability of Resources – The assets and the time accessible to specialist impact the span of test. Examination is a period and cash escalated assignment, with exercises like readiness of instrument, contracting and preparing field staff, transportation costs and so forth taking up a considerable measure of assets. Subsequently if the scientist does not have enough time and supports accessible he will settle on a littler example. Degree of Precision and Accuracy Required – . It has turned out to be clear from our prior discourse that accuracy, which is measured by standard blunder, wills high just if S.E is less or the example size is substantial. Also to get a high level of precision a bigger specimen is required. Other then these subjective efforts, sample size can be determined mathematically also. Mathematical Approach to Sample Size Determination In the mathematical approach to sample size determination the precision of estimate required is stated first and then the sample size is worked out. The precision can be specified as ${pm}$ 1 of the true mean with 99% confidence level. This means that if the sample mean is 200, then the true value of the mean will be between 199 and 201. This level of precision is denoted by the term ”c” Sample Size determination for means. The confidence interval for the universe mean is given by ${bar x pm Zfrac{sigma_p}{sqrt N} or bar x pm e}$ Where − ${bar x}$ = Sample mean ${e}$ = Acceptable error ${Z}$ = Value of standard normal variate at a given confidence level ${sigma_p}$ = Standard deviation of the population ${n}$ = Size of the sample The acceptable error ”e” i.e. the difference between ${mu}$ and ${bar x}$ is given by ${Z.frac{sigma_p}{sqrt N}}$ Thus, Size of the sample is:> ${n = frac{Z^2{sigma_p}^2}{e^2}}$ Or In case the sample size is significant visa-a-vis the population size then above formula will be corrected by the finite population multiplier. ${n = frac{Z^2.N.{sigma_p}^2}{(N-1)e^2 + Z^2.{sigma_p}^2}}$ Where − ${N}$ = size of the population Sample Size Determination for Proportions The method for determining the sample size when estimating a proportion remains the same as the method for estimating the mean. The confidence interval for universe proportion ${hat p}$ is given by ${ p pm Z. sqrt{frac{p.q}{n}}}$ Where − ${p}$ = sample proportion ${q = (1 – p)}$ ${Z}$ = Value of standard normal variate for a sample proportion ${n}$ = Size of the sample Since ${ hat p}$ is to be estimated hence the value of p can be determined by taking the value of p = 0.5, an acceptable value, giving a conservative sample size. The other option is that the value of p is estimated either through a pilot study or on a personal judgement basis. Given the value of p, the acceptable error ”e” is given by ${ e= Z. sqrt{frac{p.q}{n}} \[7pt] e^2 = Z^2frac{p.q}{n} \[7pt] n = frac{Z^2.p.q}{e^2}}$ In case the population is finite then the above formula will be corrected by the finite population multiplier. ${n = frac{Z^2.p.q.N}{e^2(N-1) + Z^2.p.q}}$ Example Problem Statement: A shopping store is interested in estimating the proportion of households possessing the store Privilege Membership card. Previous studies have shown

Student T Test

Statistics – Student T Test ”; Previous Next T-test is small sample test. It was developed by William Gosset in 1908. He published this test under the pen name of “Student”. Therefore, it is known as Student”s t-test. For applying t-test, the value of t-statistic is computed. For this, the following formula is used: Formula ${t} = frac{Deviation from the population parameter}{Standard Error of the sample statistic}$ Where − ${t}$ = Test of Hypothesis. Test of Hypothesis about population Formula ${t} ={bar X – frac{mu}{S}.sqrt{n}} , \[7pt] , where {S} = sqrt{frac{sum{(X-bar X)}^2}{n-1}}$ Example Problem Statement: An irregular sample of 9 qualities from an ordinary populace demonstrated a mean of 41.5 inches and the entirety of square of deviation from this mean equivalent to 72 inches. Show whether the supposition of mean of 44.5 inches in the populace is reasonable.(For ${v}={8}, {t_.05}={2.776}$) Solution: ${bar x = 45.5}, {mu = 44.5}, {n=9}, {sum{(X-bar X)}^2 = 72} $ Let us take the null hypothesis that the population mean is 44.5. $ i.e. {H_0: mu = 44.5} and {H_1: mu ne 44.5} , \[7pt] {S} = sqrt{frac{sum{(X-bar X)}^2}{n-1}}, \[7pt] = sqrt{frac{72}{9-1}} = sqrt{frac{72}{8}} = sqrt{9} = {3}$ Applying t-test: $ {|t|} = {bar X – frac{mu}{S}.sqrt{n}} , \[7pt] {|t|} = frac{|41.5 – 44.5|}{3} times sqrt {9}, \[7pt] = {3}$ Degrees of freedom = $ {v = n-1 = 9-1 = 8 }$. For ${v = 8, t_{0.05}}$ for two tailed test = ${2.306}$. Since, the calculated value of $ {|t|}$ > the table value of $ {t}$, we reject the null hypothesis. We conclude that the population mean is not equal to 44.5. Print Page Previous Next Advertisements ”;

Tableau – Context Filters

Tableau – Context Filters ”; Previous Next The normal filters in Tableau are independent of each other. It means each of the filter reads all the rows from the source data and creates its own result. However, there may be scenarios where you might want the second filter to process only the records returned by the first filter. In such a case, the second filter is known as dependent filters because they process only the data that passes through the context filter. Context Filters serve two main purposes. Improves performance − If you set a lot of filters or have a large data source, the queries can be slow. You can set one or more context filters to improve the performance. Creates a dependent numerical or top N filter − You can set a context filter to include only the data of interest, and then set a numerical or a top N filter. Creating Context Filter Using the Sample-superstore, find the top 10 Sub-Category of products for the category called Furniture. To achieve this objective, following are the steps. Step 1 − Drag the dimension Sub-Category to the Rows shelf and the measure Sales to the Columns Shelf. Choose the horizontal bar chart as the chart type. Drag the dimension Sub-Category again to the Filters shelf. You will get the following chart. Step 2 − Right-click on the field Sub-Category in the filter shelf and go the fourth tab named Top. Choose the option by field. From the next drop-down, choose the option Top 10 by Sales Sum as shown in the following screenshot. Step 3 − Drag the dimension Category to the filter shelf. Right-click to edit and under the general tab choose Furniture from the list. As you can see the result shows three subcategory of products. Step 4 − Right-click the Category: Furniture filter and select the option Add to Context. This produces the final result, which shows the subcategory of products from the category Furniture which are among the top 10 subcategories across all the products. Print Page Previous Next Advertisements ”;

Tableau – Motion Charts

Tableau – Motion Charts ”; Previous Next Motion charts show data using the X and Y-axes, displaying changes over time by showing the movement of data points within the defined space as well as changes in the color of the lines. The main advantage of motion chart is to view the entire trail of how the data has changed over time and not just a snapshot of the data. Tableau needs one Time Dimension and one Measure to create a Motion chart. Creating a Motion Chart Using the Sample-superstore, plan to find the variation of Profits over the months. To achieve this objective, following are the steps. Step 1 − Drag the Dimension Order Date to the Columns Shelf. Drag it again to the Pages Shelf. In the Pages shelf, right-click on the Order Date and choose Month. Then drag the measure Profit to the Rows Shelf. The following chart appears. Step 2 − Put a check mark on the box next to Show History and then click on the dropdown arrow next to it. For “Marks to Show History For” select “All”. Then under “Show”, select “Both”. Selecting “Marks” shows only the points and selecting “Trails” shows only the line. Click the Play button. The following chart appears. Step 3 − Allowing the chart to run from January to December will create the chart which shows how the profits have varied over each month for all the years. Note that as the data changes the recent months get a darker shade of color and the historical data gets a lighter shade of color. Finally, you will get the following chart. Print Page Previous Next Advertisements ”;

Tableau – Question Answers

Tableau – Questions and Answers ”; Previous Next Dear readers, these Tableau Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of SAS programming. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answer − what is Tableau? Tableau is a business intelligence software that allows anyone to connect to respective data, and then visualize and create interactive, sharable dashboards. What is a data Source page? A page where you can set up your data source. The Data Source page generally consists of four main areas: left pane, join area, preview area, and metadata area. what is a extract is Tableau? A saved subset of a data source that you can use to improve performance and analyze offline. what is a format pane in Tableau? A pane that contains formatting settings that control the entire worksheet, as well as individual fields in the view. What is LOD expression in Tableau? A syntax that supports aggregation at dimensionalities other than the view level. With level of detail expressions, you can attach one or more dimensions to any aggregate expression. What is the difference between Quick Filter and Normal filter? Normal Filter is used to restrict the data from database based on selected dimension or measure. But Quick Filters are used to give a chance to user for dynamically changing data members at run time. What is Tableau Reader? Tableau Reader is a free viewing application that lets anyone read and interact with packaged workbooks created by Tableau Desktop. Can we have multiple value selection in parameter? No Which join i sused in data blending? There won”t be any joins as such but we will just give the column references like primary and foreign key relation. What are the possible reasons for slow performance in Tableau? More Extracts, filters and depends on data sources. What is the criteria to blend the data from multiple data sources.? There should be a common dimension to blend the data source into single worksheet. What is a Dimension? Tableau treats any field containing qualitative, categorical information as a dimension. This includes any field with text or dates values. What is a Measure? A measure is a field that is a dependent on value of one or more dimensions. Tableau treats any field containing numeric (quantitative) information as a measure. What does the extension .twbx represent in Tableau? It is a file which represents Tableau Packaged Workbook, in which the .twb file grouped together with the datasources. What are the types of filters in Tableau? Custom Filters ,Context Filters, Normal Filters. What is marks card in Tableau? A card to the left of the view where you can drag fields to control mark properties such as type, color, size, shape, label, tooltip, and detail. What are shelves in Tableau? They are Named areas to the left and top of the view. You build views by placing fields onto the shelves. Some shelves are available only when you select certain mark types. What is a Tableau workbook? It is a file with a .twb extension that contains one or more worksheets (and possibly also dashboards and stories). In Tableau what is a worksheet? A sheet where you build views of your data by dragging fields onto shelves. What is an alais in Tableau? An alternative name that you can assign to a field or to a dimension member. What is a context filter? In a context filter the filter condition is applied first to the data source and then some other filters are applied only to the resulting records. What is Dual Axis? You can compare multiple measures using dual axes, which are two independent axes that are layered on top of each other. What is a page shelf in Tableau? The Pages shelf is used to control the display of output by choosing the sequence of display. What are the possible reasons for slow performance in Tableau? More Extracts, filters and depends on data sources. What is table calculation in Tableau? These are inbuilt calculations in tableau which we normally use to calculate Percentange chages. What is data blending? Data blending is used to blend data from multiple data sources on a single worksheet. The data is joined on common dimensions. Can we have multiple value selection in parameter? No What is Connect live? It Creates a direct connect to the data source and speed up access. What is Import all data feature in Tableau? It Imports the entire data source into Tableau’s fast data engine as an extract and saves it in the workbook. What are parameters and when do you use it? Parameters are dynamic values that can replace constant values in calculations. What is TDE file in Tableau? It refers to the file that contains data extracted from external sources like MS Excel, MS Access or CSV file. What is a story in Tableau? A story is a sheet that contains a sequence of worksheets or dashboards that work together to convey information. What is a Published data source? It contains connection information that is independent of any workbook and can be used by multiple workbooks. What is a Embedded data source? It contains connection information and is associated with a workbook. when to use Joins versus Blending in Tableau? If data resides in a single source,we use Joins but when your data is not in one place blending is used. How to automate reports using Tableau software? You need to publish report to tableau server, while publishing you will find one option to schedule reports.You just need to select the time when you want to refresh data. what is Tableau Show me? Show Me is used to apply a required view to the existing data in

Zookeeper – API

Zookeeper – API ”; Previous Next ZooKeeper has an official API binding for Java and C. The ZooKeeper community provides unofficial API for most of the languages (.NET, python, etc.). Using ZooKeeper API, an application can connect, interact, manipulate data, coordinate, and finally disconnect from a ZooKeeper ensemble. ZooKeeper API has a rich set of features to get all the functionality of the ZooKeeper ensemble in a simple and safe manner. ZooKeeper API provides both synchronous and asynchronous methods. ZooKeeper ensemble and ZooKeeper API completely complement each other in every aspect and it benefits the developers in a great way. Let us discuss Java binding in this chapter. Basics of ZooKeeper API Application interacting with ZooKeeper ensemble is referred as ZooKeeper Client or simply Client. Znode is the core component of ZooKeeper ensemble and ZooKeeper API provides a small set of methods to manipulate all the details of znode with ZooKeeper ensemble. A client should follow the steps given below to have a clear and clean interaction with ZooKeeper ensemble. Connect to the ZooKeeper ensemble. ZooKeeper ensemble assign a Session ID for the client. Send heartbeats to the server periodically. Otherwise, the ZooKeeper ensemble expires the Session ID and the client needs to reconnect. Get / Set the znodes as long as a session ID is active. Disconnect from the ZooKeeper ensemble, once all the tasks are completed. If the client is inactive for a prolonged time, then the ZooKeeper ensemble will automatically disconnect the client. Java Binding Let us understand the most important set of ZooKeeper API in this chapter. The central part of the ZooKeeper API is ZooKeeper class. It provides options to connect the ZooKeeper ensemble in its constructor and has the following methods − connect − connect to the ZooKeeper ensemble create − create a znode exists − check whether a znode exists and its information getData − get data from a particular znode setData − set data in a particular znode getChildren − get all sub-nodes available in a particular znode delete − get a particular znode and all its children close − close a connection Connect to the ZooKeeper Ensemble The ZooKeeper class provides connection functionality through its constructor. The signature of the constructor is as follows − ZooKeeper(String connectionString, int sessionTimeout, Watcher watcher) Where, connectionString − ZooKeeper ensemble host. sessionTimeout − session timeout in milliseconds. watcher − an object implementing “Watcher” interface. The ZooKeeper ensemble returns the connection status through the watcher object. Let us create a new helper class ZooKeeperConnection and add a method connect. The connect method creates a ZooKeeper object, connects to the ZooKeeper ensemble, and then returns the object. Here CountDownLatch is used to stop (wait) the main process until the client connects with the ZooKeeper ensemble. The ZooKeeper ensemble replies the connection status through the Watcher callback. The Watcher callback will be called once the client connects with the ZooKeeper ensemble and the Watcher callback calls the countDown method of the CountDownLatch to release the lock, await in the main process. Here is the complete code to connect with a ZooKeeper ensemble. Coding: ZooKeeperConnection.java // import java classes import java.io.IOException; import java.util.concurrent.CountDownLatch; // import zookeeper classes import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.WatchedEvent; import org.apache.zookeeper.Watcher; import org.apache.zookeeper.Watcher.Event.KeeperState; import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.AsyncCallback.StatCallback; import org.apache.zookeeper.KeeperException.Code; import org.apache.zookeeper.data.Stat; public class ZooKeeperConnection { // declare zookeeper instance to access ZooKeeper ensemble private ZooKeeper zoo; final CountDownLatch connectedSignal = new CountDownLatch(1); // Method to connect zookeeper ensemble. public ZooKeeper connect(String host) throws IOException,InterruptedException { zoo = new ZooKeeper(host,5000,new Watcher() { public void process(WatchedEvent we) { if (we.getState() == KeeperState.SyncConnected) { connectedSignal.countDown(); } } }); connectedSignal.await(); return zoo; } // Method to disconnect from zookeeper server public void close() throws InterruptedException { zoo.close(); } } Save the above code and it will be used in the next section for connecting the ZooKeeper ensemble. Create a Znode The ZooKeeper class provides create method to create a new znode in the ZooKeeper ensemble. The signature of the create method is as follows − create(String path, byte[] data, List<ACL> acl, CreateMode createMode) Where, path − Znode path. For example, /myapp1, /myapp2, /myapp1/mydata1, myapp2/mydata1/myanothersubdata data − data to store in a specified znode path acl − access control list of the node to be created. ZooKeeper API provides a static interface ZooDefs.Ids to get some of basic acl list. For example, ZooDefs.Ids.OPEN_ACL_UNSAFE returns a list of acl for open znodes. createMode − the type of node, either ephemeral, sequential, or both. This is an enum. Let us create a new Java application to check the create functionality of the ZooKeeper API. Create a file ZKCreate.java. In the main method, create an object of type ZooKeeperConnection and call the connect method to connect to the ZooKeeper ensemble. The connect method will return the ZooKeeper object zk. Now, call the create method of zk object with custom path and data. The complete program code to create a znode is as follows − Coding: ZKCreate.java import java.io.IOException; import org.apache.zookeeper.WatchedEvent; import org.apache.zookeeper.Watcher; import org.apache.zookeeper.Watcher.Event.KeeperState; import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.ZooDefs; public class ZKCreate { // create static instance for zookeeper class. private static ZooKeeper zk; // create static instance for ZooKeeperConnection class. private static ZooKeeperConnection conn; // Method to create znode in zookeeper ensemble public static void create(String path, byte[] data) throws KeeperException,InterruptedException { zk.create(path, data, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); } public static void main(String[] args) { // znode path String path = “/MyFirstZnode”; // Assign path to znode // data in byte array byte[] data = “My first zookeeper app”.getBytes(); // Declare data try { conn = new ZooKeeperConnection(); zk = conn.connect(“localhost”); create(path, data); // Create the data to the specified path conn.close(); } catch (Exception e) { System.out.println(e.getMessage()); //Catch error message } } } Once the application is compiled and executed, a znode with the specified data will be created in the ZooKeeper ensemble. You can check it using the ZooKeeper CLI zkCli.sh. cd /path/to/zookeeper bin/zkCli.sh >>> get /MyFirstZnode Exists – Check the Existence of a Znode The ZooKeeper

Sampling methods

Statistics – Sampling methods ”; Previous Next Sampling methods are the ways to choose people from the population to be considered in a sample survey. Samples can be divided based on following criteria. Probability samples – In such samples, each population element has a known probability or chance of being chosen for the sample. Non-probability samples – In such samples, one can not be assured of having known probility of each population element. Probability sampling methods Probability sampling methods ensures that the sample choosen represent the population correctly and the survey conducted will be statistically valid. Following are the types of probability sampling methods: Simple random sampling. – This method refers to a method having following properties: The population have N objects. The sample have n objects. All possible samples of n objects have equal probability of occurence. One example of simple random sampling is lottery method. Assign each population element a unique number and place the numbers in bowl.Mix the numbers throughly. A blind-folded researcher is to select n numbers. Include those population element in the sample whose number has been selected. Stratified sampling – In this type of sampling method, population is divided into groups called strata based on certain common characteristic like geography. Then samples are selected from each group using simple random sampling method and then survey is conducted on people of those samples. Cluster sampling – In this type of sampling method, each population member is assigned to a unique group called cluster. A sample cluster is selected using simple random sampling method and then survey is conducted on people of that sample cluster. Multistage sampling – In such case, combination of different sampling methods at different stages. For example, at first stage, cluster sampling can be used to choose clusters from population and then sample random sampling can be used to choose elements from each cluster for the final sample. Systematic random sampling – In this type of sampling method, a list of every member of population is created and then first sample element is randomly selected from first k elements. Thereafter, every kth element is selected from the list. Non-probability sampling methods Non-probability sampling methods are convenient and cost-savvy. But they do not allow to estimate the extent to which sample statistics are likely to vary from population parameters. Whereas probability sampling methods allows that kind of analysis. Following are the types of non-probability sampling methods: Voluntary sample – In such sampling methods, interested people are asked to get involved in a voluntary survey. A good example of voluntary sample in on-line poll of a news show where viewers are asked to participate. In voluntary sample, viewers choose the sample, not the one who conducts survey. Convenience sample – In such sampling methods, surveyor picks people who are easily available to give their inputs. For example, a surveyer chooses a cinema hall to survey movie viewers. If the cinema hall was selected on the basis that it was easier to reach then it is a convenience sampling method. Print Page Previous Next Advertisements ”;

Reliability Coefficient

Statistics – Reliability Coefficient ”; Previous Next A measure of the accuracy of a test or measuring instrument obtained by measuring the same individuals twice and computing the correlation of the two sets of measures. Reliability Coefficient is defined and given by the following function: Formula ${Reliability Coefficient, RC = (frac{N}{(N-1)}) times (frac{(Total Variance – Sum of Variance)}{Total Variance})}$ Where − ${N}$ = Number of Tasks Example Problem Statement: An undertaking was experienced with three Persons (P) and they are assigned with three distinct Tasks (T). Discover the Reliability Coefficient? P0-T0 = 10 P1-T0 = 20 P0-T1 = 30 P1-T1 = 40 P0-T2 = 50 P1-T2 = 60 Solution: Given, Number of Students (P) = 3 Number of Tasks (N) = 3. To Find, Reliability Coefficient, follow the steps as following: Step 1 Give us a chance to first figure the average score of the persons and their tasks The average score of Task (T0) = 10 + 20/2 = 15 The average score of Task (T1) = 30 + 40/2 = 35 The average score of Task (T2) = 50 + 60/2 = 55 Step 2 Next, figure the variance for: Variance of P0-T0 and P1-T0: Variance = square (10-15) + square (20-15)/2 = 25 Variance of P0-T1 and P1-T1: Variance = square (30-35) + square (40-35)/2 = 25 Variance of P0-T2 and P1-T2: Variance = square (50-55) + square (50-55)/2 = 25 Step 3 Presently, figure the individual variance of P0-T0 and P1-T0, P0-T1 and P1-T1, P0-T2 and P1-T2. To ascertain the individual variance value, we ought to include all the above computed change values. Total of Individual Variance = 25+25+25=75 Step 4 Compute the Total change Variance= square ((P0-T0) – normal score of Person 0) = square (10-15) = 25 Variance= square ((P1-T0) – normal score of Person 0) = square (20-15) = 25 Variance= square ((P0-T1) – normal score of Person 1) = square (30-35) = 25 Variance= square ((P1-T1) – normal score of Person 1) = square (40-35) = 25 Variance= square ((P0-T2) – normal score of Person 2) = square (50-55) = 25 Variance= square ((P1-T2) – normal score of Person 2) = square (60-55) = 25 Now, include every one of the qualities and figure the aggregate change Total Variance= 25+25+25+25+25+25 = 150 Step 5 At last, substitute the qualities in the underneath offered equation to discover ${Reliability Coefficient, RC = (frac{N}{(N-1)}) times (frac{(Total Variance – Sum of Variance)}{Total Variance}) \[7pt] = frac{3}{(3-1)} times frac{(150-75)}{150} \[7pt] = 0.75 }$ Print Page Previous Next Advertisements ”;

Shannon Wiener Diversity Index

Statistics – Shannon Wiener Diversity Index ”; Previous Next In the literature, the terms species richness and species diversity are sometimes used interchangeably. We suggest that at the very least, authors should define what they mean by either term. Of the many species diversity indices used in the literature, the Shannon Index is perhaps most commonly used. On some occasions it is called the Shannon-Wiener Index and on other occasions it is called the Shannon-Weaver Index. We suggest an explanation for this dual use of terms and in so doing we offer a tribute to the late Claude Shannon (who passed away on 24 February 2001). Shannon-Wiener Index is defined and given by the following function: ${ H = sum[(p_i) times ln(p_i)] }$ Where − ${p_i}$ = proportion of total sample represented by species ${i}$. Divide no. of individuals of species i by total number of samples. ${S}$ = number of species, = species richness ${H_{max} = ln(S)}$ = Maximum diversity possible ${E}$ = Evenness = ${frac{H}{H_{max}}}$ Example Problem Statement: The samples of 5 species are 60,10,25,1,4. Calculate the Shannon diversity index and Evenness for these sample values. Sample Values (S) = 60,10,25,1,4 number of species (N) = 5 First, let us calculate the sum of the given values. sum = (60+10+25+1+4) = 100 Species ${(i)}$ No. in sample ${p_i}$ ${ln(p_i)}$ ${p_i times ln(p_i)}$ Big bluestem 60 0.60 -0.51 -0.31 Partridge pea 10 0.10 -2.30 -0.23 Sumac 25 0.25 -1.39 -0.35 Sedge 1 0.01 -4.61 -0.05 Lespedeza 4 0.04 -3.22 -0.13 S = 5 Sum = 100     Sum = -1.07 ${H = 1.07 \[7pt] H_{max} = ln(S) = ln(5) = 1.61 \[7pt] E = frac{1.07}{1.61} = 0.66 \[7pt] Shannon diversity index(H) = 1.07 \[7pt] Evenness =0.66 }$ Print Page Previous Next Advertisements ”;