public byte variance(String fileName) throws IOException {
		
		initialize(fileName);
		FileOutputStream fos = null;
	    DataOutputStream dos = null;
	    try{
	    	// create file output stream
	    	fos = new FileOutputStream("variance_bin");
	    	// create data output stream
	    	dos = new DataOutputStream(fos);
	    	String[] params = list.get(0).split("\\s");
	    	if(!(params[0].equals("param"))){
	    		System.out.println("Incorrect variance file given as argument");
	    		System.exit(0);
        }
        float c = Float.parseFloat(params[3]);
        dos.writeFloat(Float.parseFloat(params[1]));
        dos.writeFloat(Float.parseFloat(params[3]));
        
		for (int i = 1; i < list.size(); i++) 
			{	
			if(!(i % (c+2) == 1 || i % (c+2) == 2) )
			{
				String[] result = list.get(i).split("\\s");
				for (int j = 2; j < result.length; j++)
				dos.writeFloat(Float.parseFloat(result[j]));
			}
			
		}
	    }catch(Exception e){
	            // if any I/O error occurs
	            e.printStackTrace();
	            return 0;
	         }finally{ if(dos != null)
	             dos.close();
	         if(fos!=null)
	            fos.close();
	         }
	    return 1;
	    }